Discussions
EJB programming & troubleshooting: Eclipse: Unable to complile Code(Code base JDK1.3) using JDK1.4
-
Eclipse: Unable to complile Code(Code base JDK1.3) using JDK1.4 (8 messages)
- Posted by: manish gupta
- Posted on: September 27 2006 07:54 EDT
Hi, I am new member of this forum. I am facing a problem to compile code (code base is JDK1.3 and default packages are using in code) using JDK1.4 under eclipse. Compile Error as follow: [javac] C:\RNPSServer\src\com\tsystems\rnpspate\TestClient.java:3: '.' expected [javac] import AccessControl; Can anybody, let me know what should I have to do to resolve this issue. Thanks, +ManishThreaded Messages (8)
- Re: Eclipse: Unable to complile Code(Code base JDK1.3) using JDK by arijit dey on September 27 2006 08:05 EDT
- Re: Eclipse: Unable to complile Code(Code base JDK1.3) using JDK by manish gupta on September 27 2006 08:13 EDT
- Re: Eclipse: Unable to complile Code(Code base JDK1.3) using JDK by arijit dey on September 27 2006 08:26 EDT
- Re: Eclipse: Unable to complile Code(Code base JDK1.3) using JDK by manish gupta on September 28 2006 00:04 EDT
- Re: Eclipse: Unable to complile Code(Code base JDK1.3) using JDK by arijit dey on September 28 2006 01:25 EDT
- Re: Eclipse: Unable to complile Code(Code base JDK1.3) using JDK by manish gupta on September 28 2006 06:21 EDT
- Can't import default package members from a named package by Pseudo Nym on September 28 2006 10:36 EDT
- Re: Can't import default package members from a named package by manish gupta on September 29 2006 02:23 EDT
-
Re: Eclipse: Unable to complile Code(Code base JDK1.3) using JDK[ Go to top ]
- Posted by: arijit dey
- Posted on: September 27 2006 08:05 EDT
- in response to manish gupta
The exception stack trace is telling you that you are missing one "." in line number 3 of TestClient class and also telling you to import AccessControl. Go and have a look. cheers, http://javaicillusion.blogspot.com/ -
Re: Eclipse: Unable to complile Code(Code base JDK1.3) using JDK[ Go to top ]
- Posted by: manish gupta
- Posted on: September 27 2006 08:13 EDT
- in response to manish gupta
Thanks for reply. So I don't think it is something related to import the classes because it is working fine with JDK1.3+ One more thing is that imported classes are in default package. Thanks, +Manish -
Re: Eclipse: Unable to complile Code(Code base JDK1.3) using JDK[ Go to top ]
- Posted by: arijit dey
- Posted on: September 27 2006 08:26 EDT
- in response to manish gupta
Did you fix that "." problem? -
Re: Eclipse: Unable to complile Code(Code base JDK1.3) using JDK[ Go to top ]
- Posted by: manish gupta
- Posted on: September 28 2006 00:04 EDT
- in response to manish gupta
Hi.. AccessControl is a class in default package. So what should I have to do with this class? I included as "import AccessControl". So It is not a problem related to "." while import the package/class. -
Re: Eclipse: Unable to complile Code(Code base JDK1.3) using JDK[ Go to top ]
- Posted by: arijit dey
- Posted on: September 28 2006 01:25 EDT
- in response to manish gupta
Post the source code for TestClient! cheers, http://javaicillusion.blogspot.com/ -
Re: Eclipse: Unable to complile Code(Code base JDK1.3) using JDK[ Go to top ]
- Posted by: manish gupta
- Posted on: September 28 2006 06:21 EDT
- in response to manish gupta
Dear Arijit, As per my knowledge, problem seems very simple that JVM is unable to load deafult package's classes during compilation. So I think, it's something related to configuration issue with eclipse to compile code with JDK1.4. How do eclipse load JDK/JRE etc? from my end, I updated JRE path and pointed to JDK1.4 in eclipse. Please feel free to give any more suggestion. Thanks +Manish -
Can't import default package members from a named package[ Go to top ]
- Posted by: Pseudo Nym
- Posted on: September 28 2006 10:36 EDT
- in response to manish gupta
Google says: "Starting with Java 1.4, you can't import a class unless it belongs to some named package." http://mindprod.com/jgloss/package.html -
Re: Can't import default package members from a named package[ Go to top ]
- Posted by: manish gupta
- Posted on: September 29 2006 02:23 EDT
- in response to Pseudo Nym
Hello, I know very well about the same. But some compatiblity should be there to suport old JDK version code. Requirement is that have to compile code[JDK1.3] with latest JDK. But using latest JDK, I am not able to compile the code that is doing compile successfully with JDK1.3 So let me suggest, what should I have to do? Thanks, +Manish