• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Fedora 5, Eclipse, and jdk 1.5

 
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
jay vas
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Curse your sudden but inevitable betrayal! And this tiny ad too!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic