aspose file tools*
The moose likes Java in General and the fly likes Strange CLASSPATH Problem... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Strange CLASSPATH Problem..." Watch "Strange CLASSPATH Problem..." New topic
Author

Strange CLASSPATH Problem...

Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Hi Everyone,

I shifted to a new PC in office a week ago and I have installed JDK1.6 in the PC. But today when I started Eclipse I get the exception that Eclipse wont run with JDK1.4. The funny thing is my CLASSPATH and PATH variables are all set in the Advanced Options. Even echo %CLASSPATH% returns the JDK1.6 path. But when I run the command java -version I get the JDK1.4.

Here's what is set in the PC:


Output:


Could you guys tell me how to solve this so that i can get the Eclipse running.
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Oh.. I solved it. There was a PATH variable in the System Variables section which was referencing to the JRE which came with Oracle which was JDK1.4.2. Deleted the JRE entry and it works now.

Thanks guys!
saipraneeth nallapareddy
Ranch Hand

Joined: Dec 02, 2009
Posts: 159
you can set you required java version by setting the preferences in eclipse.
Window->Preferences -->Java-->Installed JRE's
you can add here.

you can set the java path by setting the java home as a variable, the standard way of using is JAVA_HOME the value for this must be the root directory of your installed jdk.
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3829

Somnath Mallick wrote:

And, don't set the "CLASSPATH" to this at all, It should be "JAVA_HOME".


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
I have JAVA_HOME set as well. When it wasn't working i looked up some guides. Where it was mentioned CLASSPATH. So i did set them as such. But i have JAVA_HOME set as well.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Strange CLASSPATH Problem...