Results 1 to 12 of 12
  1. #1
    luke_devon is offline Member
    Join Date
    Jul 2010
    Posts
    7
    Rep Power
    0

    Default Java classpath in Windows 7

    Hi

    I am setting up java classpath in Windows 7. By default , jre6 has been installed in the system.Hence java run time process been pointed into jre 6.

    For a reason I wanted to install and setup the classpath for java 1.5.

    for the environment variables : CLASSPATH c:\jdk\1.5\bin;.;
    JAVA_HOME c:\jdk\1.5
    PATH : i have added following line ,

    ;c:\jdk\1.5\bin

    when I observe the java version , it is still pointed into java 1.6 which is capture the values from jvm.cfg

    Can somebody help me to setup the class path for java 1.5 permanently?

    Many Thanks
    Luke

  2. #2
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    can I ask what you are using to discover the current java version?

  3. #3
    luke_devon is offline Member
    Join Date
    Jul 2010
    Posts
    7
    Rep Power
    0

    Default

    java -version , then its gives java 1.6 not java 1.5.

    That is because still java class path pointed into java 1.6.

    Thanks
    Luke

  4. #4
    luke_devon is offline Member
    Join Date
    Jul 2010
    Posts
    7
    Rep Power
    0

    Default

    Quote Originally Posted by al_Marshy_1981 View Post
    can I ask what you are using to discover the current java version?
    java -version , then its gives java 1.6 not java 1.5.

    That is because still java class path pointed into java 1.6.

    Thanks
    Luke

  5. #5
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    It should'nt be neccessary on windies 7 but just to be sure you definetely restarted the computer after changing the classspath and everything? lets just get the ridiculous out of the way first :D

  6. #6
    luke_devon is offline Member
    Join Date
    Jul 2010
    Posts
    7
    Rep Power
    0

    Default

    Quote Originally Posted by al_Marshy_1981 View Post
    It should'nt be neccessary on windies 7 but just to be sure you definetely restarted the computer after changing the classspath and everything? lets just get the ridiculous out of the way first :D
    yes ofcoz , i have restarted the machine. Still the same.

    always it is pointed in to jre6 where been installed by default in the box.

    Thanks
    Luke

  7. #7
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    Java Code:
    PATH : i have added following line ,
    ;c:\jdk\1.5\bin
    have you got a semi colon after bin? in environment variables?

  8. #8
    luke_devon is offline Member
    Join Date
    Jul 2010
    Posts
    7
    Rep Power
    0

    Default

    Quote Originally Posted by al_Marshy_1981 View Post
    Java Code:
    PATH : i have added following line ,
    ;c:\jdk\1.5\bin
    have you got a semi colon after bin? in environment variables?
    as per the current configurations - in the env variables , for system variables ,

    CLASSPATH - C:\Program Files\Java\jdk1.5.0_16;.;
    JAVA_HOME - C:\Program Files\Java\jdk1.5.0_16
    Path - ***Common\;C:\Program Files\Java\jdk1.5.0_16\bin

    Thanks
    Luke

  9. #9
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    hmm are you using an IDE to run you java programs?

  10. #10
    luke_devon is offline Member
    Join Date
    Jul 2010
    Posts
    7
    Rep Power
    0

    Default

    Quote Originally Posted by al_Marshy_1981 View Post
    hmm are you using an IDE to run you java programs?
    Since I am beginner , I dnt use IDE coz i wanted to learn from the begining.I uses command line

  11. #11
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    I am at a loss to be honest, i just checked my version and I am running 2 updates behind apparently when I am pretty sure I am not, (using Vista). Think you will have to wait for one of the really good experts here. sorry.

  12. #12
    NJS
    NJS is offline Member
    Join Date
    Sep 2010
    Posts
    1
    Rep Power
    0

    Default

    I am late to the game, just joined the forum... found this thread when googling for something else...

    if java 1.6 is listed in your PATH before java 1.5 (which seems to be listed at the end of your path), it will find your 1.6 first.

Similar Threads

  1. Classpath issue, java 1.5 vs java 1.6 and -cp
    By Gideonzx in forum New To Java
    Replies: 4
    Last Post: 05-26-2010, 10:47 PM
  2. java on windows 64
    By JoelOFH in forum New To Java
    Replies: 1
    Last Post: 01-27-2010, 07:27 AM
  3. Java IDE for windows 7
    By Implode in forum New To Java
    Replies: 3
    Last Post: 09-17-2009, 09:16 AM
  4. Replies: 10
    Last Post: 10-30-2008, 05:57 PM
  5. Help with windows in java
    By lenny in forum AWT / Swing
    Replies: 1
    Last Post: 08-07-2007, 07:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •