Discussions

EJB programming & troubleshooting: Eclipse: Unable to complile Code(Code base JDK1.3) using JDK1.4

  1. 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, +Manish
  2. 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/
  3. 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
  4. Did you fix that "." problem?
  5. 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.
  6. Post the source code for TestClient! cheers, http://javaicillusion.blogspot.com/
  7. 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
  8. 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
  9. 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