• 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

Strange CLASSPATH Problem...

 
Ranch Hand
Posts: 483
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 483
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 483
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic