• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

another Eclipse issue

 
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
 
author
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
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • 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
 
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic