File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes another Eclipse issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "another Eclipse issue" Watch "another Eclipse issue" New topic
Author

another Eclipse issue

jorge zapata
Greenhorn

Joined: Oct 04, 2001
Posts: 18
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


SCJP, IBM Certified Specialist (WebSphere v3.5)
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
It seems as if you are using the JDK1.3 compiler, but have the JDK1.4 classes in the classpath.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
jorge zapata
Greenhorn

Joined: Oct 04, 2001
Posts: 18
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

Joined: Oct 04, 2001
Posts: 18
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

Joined: Oct 12, 2001
Posts: 1179

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


Regards, Rene Larsen
Dropbox Invite
jorge zapata
Greenhorn

Joined: Oct 04, 2001
Posts: 18
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: another Eclipse issue