Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Strange CLASSPATH Problem...

 
Somnath Mallick
Ranch Hand
Posts: 482
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 482
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somnath Mallick wrote:

And, don't set the "CLASSPATH" to this at all, It should be "JAVA_HOME".
 
Somnath Mallick
Ranch Hand
Posts: 482
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic