Results 1 to 8 of 8
  1. #1
    shobha2k8 is offline Member
    Join Date
    May 2008
    Posts
    4
    Rep Power
    0

    Default Plz help me reg chaging the java version in commandprompt

    When I typed the command as 'java -version' in commandprompt its showing "java version 1.3.1_01"

    but I want to set it to latest version of java which is in the path C:\Program Files\Java\jdk1.5.0_06
    Due to this problem Im not able to open Eclipse, its saying "version 1.3.1_01 is not suitable for this product, version 1.4.1 or greater is required"

    I have added the environment variables user variables JAVA_HOME value as C:\j2sdk1.4.2_12.

    Could you please help me out soon.
    Thanks in advance

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  3. #3
    pao
    pao is offline Member
    Join Date
    Jun 2008
    Posts
    43
    Rep Power
    0

    Default

    You probably have a few versions of java installed, if you are on windows look in your java folder.

    If you look in C:\WINDOWS\system32 you will see a version of java there, if you look at your path variable I expect that system32 is at the beginning of it.

    Move your jdk value to the start of your path variable and this is the one that will be picked up from now on, you will be able to confirm this by typing java -version again and you will see the version you want.

    Cheers.

    Ps hope this makes sense!

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Yes, that's what I want to pointed. There is few versions of installations are found. Why don't you use the latest version of Java?

    By the way, welcome pao to our community.

  5. #5
    pao
    pao is offline Member
    Join Date
    Jun 2008
    Posts
    43
    Rep Power
    0

    Default

    Quote Originally Posted by Eranga View Post


    By the way, welcome pao to our community.
    Cheers for the welcome

  6. #6
    vinaytj is offline Member
    Join Date
    Jun 2008
    Posts
    2
    Rep Power
    0

    Default To set the new version

    hi,

    In order to set the new version, do the following :

    1. Create a System variable by name "JAVA_HOME".
    2. Give the value for that variable as C:\Program Files\Java\jdk1.5.0_06.
    3. Create another System variable by name "CLASSPATH" and give the value as C:\Program Files\Java\jdk1.5.0_06. if already you have CLASSPATH variable, than just include (append to previous) the value C:\Program Files\Java\jdk1.5.0_06.
    4. Close all the files and open again.
    5. Now you type the command as 'java -version' in commandprompt.
    6. if than also it wont work means , you do the same procedure for System variable "PATH" and value is C:\Program Files\Java\jdk1.5.0_06\bin.

    I hope it will work.

    Regards,
    Vinay T J

  7. #7
    pao
    pao is offline Member
    Join Date
    Jun 2008
    Posts
    43
    Rep Power
    0

    Default

    I could be wrong, but I think the value PATH is the one you should change as I explained in my post above. If you put your jdk entry at the start of the PATH variable it will pick it up.

    I believe JAVA_HOME is used by applications such as tomcat and ANT, I don't think it is used by windows OSor the JVM (please correct me if I am wrong though).

    Whenever I have experienced this problem, changing JAVA_HOME has no effect, changing PATH does.

    Cheers

  8. #8
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default

    Uninstall the old jdk,(that installation configures the path, so that should remove what that old jdk installation done when uninstalled) if you done it by yourself, simply remove what you have done in the environment variable....

    and intall the new Version of JDK...
    freedom exists in the world of ideas

Similar Threads

  1. How to find java version
    By roshithmca in forum New To Java
    Replies: 3
    Last Post: 04-27-2012, 06:10 AM
  2. Netware: JAVA.NLM Version 1.31h Parameters
    By Larry Mateo in forum New To Java
    Replies: 0
    Last Post: 03-20-2008, 11:34 PM
  3. Internet Explorer java version
    By shimer in forum Java Applets
    Replies: 2
    Last Post: 07-31-2007, 07:30 AM
  4. how to remove an old version of JDK
    By tommy in forum New To Java
    Replies: 2
    Last Post: 07-30-2007, 08:59 AM
  5. to version
    By Alan in forum New To Java
    Replies: 2
    Last Post: 05-31-2007, 06:05 PM

Posting Permissions

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