Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

another Eclipse issue

 
jorge zapata
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok so I have ant working with eclipse, thanks to you all.
now I am having a wierd error when compiling via ant on eclipse. i get this:
[javac] C:\src\cashapp\src\com\nineci\cashapply\caexport\HistoryStatus.java:16: cannot access java.lang.Object
[javac] bad class file: C:\Program Files\Java\j2re1.4.1_02\lib\rt.jar(java/lang/Object.class)
[javac] class file has wrong version 48.0, should be 47.0
[javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
[javac] private static Logger log = Logger.getLogger(HistoryStatus.class);
[javac] ^
[javac] 1 error
[javac] BUILD FAILED: file:C:/src/cashapp/build.xml:88: Compile failed; see the compiler error output for details.

it seems like a compiler issue or something, not really sure how to even start digging into this problem. any suggestions would be greatly appreciated.
Thanks in advance,
jorge
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems as if you are using the JDK1.3 compiler, but have the JDK1.4 classes in the classpath.
 
jorge zapata
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i upgraded my j2sdk to 1.4.1_02 and changed my path and java_home variables. reinstalled eclipse, made sure all the .jar files where referenced correctly. tried to compile via ant (ant is working after adding tools.jar to the ant runtime via eclipse) and still get the ugly error! this thing is driving me nuts. if anyone has any suggestions I would highly appreciate it.
thank you,
jorge
-ps here is the error again:
[javac] C:\src\cashapp\src\com\nineci\cashapply\caexport\HistoryStatus.java:16: cannot access java.lang.Object
[javac] bad class file: C:\Program Files\Java\j2re1.4.1_02\lib\rt.jar(java/lang/Object.class)
[javac] class file has wrong version 48.0, should be 47.0
[javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
[javac] private static Logger log = Logger.getLogger(HistoryStatus.class);
[javac] ^
[javac] 1 error
[javac] BUILD FAILED: file:C:/src/cashapp/build.xml:88: Compile failed; see the compiler error output for details.
 
jorge zapata
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh yeah, i am able to build successfully using ant via a DOS window. so it HAS to be some setting in eclipse.
jz
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the java version when you in a DOS window type 'java -version'?
In your PATH, do you have any ref. to some 'old' java version?
Rene
 
jorge zapata
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
java_home is set to C:\j2sdk1.4.1_02
and my path refers %JAVA_HOME%\bin
thank you,
jorge
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic