wood burning stoves 2.0*
The moose likes Linux / UNIX and the fly likes Fedora 5, Eclipse, and jdk 1.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Fedora 5, Eclipse, and jdk 1.5 " Watch "Fedora 5, Eclipse, and jdk 1.5 " New topic
Author

Fedora 5, Eclipse, and jdk 1.5

jay vas
Ranch Hand

Joined: Aug 30, 2005
Posts: 407
Hi guys : Im using js2dk 1.4 with eclipse and Fedora and it works fine. I tried to download jdk1.5 and installed it using the shell script provided. I think it worked, but unfortunately when running eclipse with the -vm argument pointing to jdk1.5, I get the following error

Error occured during initialization of VM :
java/lang/NoClassDefFoundError: java/lang/Object

1) Any ideas on why this is a problem, or about a simple way to install java 1.5 ?

2) I tried starting eclipse using java 1.4 which works, and simply pointing to java 1.5 in the source. However, although eclipse doesnt complain , it doesnt "update" the compiler when i do this - i.e. there are still errors flagged when I use java 1.5 features (i.e. such as generalizations).

Any step by step instructions for installation of the jdk on fedora 5 would be much appreiciated...

Please help. I have a highly object oriented app which has a lot of general data types, so Im despearte to start working in java 5 so I can quit having to cast everything the old way !

-j
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15958
    
  19

I'm not sure what you mean by "using the -vm" argument.

All you need is to have the JAVA_HOME environment variable set to point to your JDK directory. That determines the JDK that Eclipse itself will run in.

Within Eclipse you can register one or more JDKs that individual projects can be used with. In the case of upgrading Eclipse's own JDK, you may need to go to the Window/Preferences dialog, topic Java/Installed JREs and register the new JDK.


Customer surveys are for companies who didn't pay proper attention to begin with.
jay vas
Ranch Hand

Joined: Aug 30, 2005
Posts: 407
Ok, I have set the compiler to point to the jdk root directory ... but now I get the following error at the top of all my classes :

The type java.lang.Object cannot be resolved

Seems like an odd error. Any ideas ?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15958
    
  19

I take that to mean that you have Eclipse running and projects displayed in a workspace.

Any time you get "The type java.lang.Object cannot be resolved
", it means that the compiler or jvm doesn't know where the JDK (or JRE) is located.

For an individual project, therefore, go to the Window/Preferences dialog, topic Java/Installed JREs and verify that at least one JDK is registered. Also check one on them to be the default JRE, just to keep from having to explicitly set each project.

To set a project's JRE explicitly, you'd go to the project properties Java Build Path topic, classpath tab and change the JRE System Library. If there isn't one, the project has a problem. Use the Add Library button to select one.
 
Consider Paul's rocket mass heater.
 
subject: Fedora 5, Eclipse, and jdk 1.5
 
Similar Threads
rowset.jar with jdk1.4
Probelms with JDK 1.4 compiling with packages
-Xrunjcov option
XSLT transformations with JDK1.5 and Tomcat 5.5
Eclipse not Opening