This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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 !
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.
An IDE is no substitute for an Intelligent Developer.
Joined: Aug 30, 2005
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 :
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.