Find the answer to your Linux question:
Results 1 to 4 of 4
Dear all, I installed jre 1.6 in RHEL 5. its installed successfully.but when i check the version of java by java -version command its shows only 1.4. anything need to ...
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    15

    Exclamation Problem in Installing JAVA in RHEL5

    Dear all,

    I installed jre 1.6 in RHEL 5.

    its installed successfully.but when i check the version of java by java -version command its shows only 1.4.

    anything need to be done to update this?


    thanks in advance

  2. #2
    Just Joined! mvprasadch's Avatar
    Join Date
    Aug 2010
    Location
    Bangalore, India
    Posts
    1
    Hi Hemant,

    Although you had installed JRE 1.6, it is not defined the root PATH to access JRE 1.6.

    When you execute - # java -version, it shows the version of that java, which is defined in your path and it is 1.4

    Provide the location of JRE 1.6 in the PATH and then you will get the correct java version displayed

    For Ex: If you had installed JRE 1.6 in /opt/java1.6, set the PATH in the .bash_profile file as follows :-

    PATH=/opt/java1.6/bin:$PATH

    After modifying the PATH in the .bash_profile, save the file and logout from the session, in which you were working earlier and login again.

    Now, when you execute # java -version, you should see 1.6 version

    Thanks,

    Maruthi Vara Prasad Ch

  3. #3
    Just Joined!
    Join Date
    Aug 2010
    Posts
    3
    The easiest way to manage this is by configuring the alternatives. To do this

    alternatives --install /usr/bin/java java /path/to/installed/jre/bin/java

    alternatives --config java

    you will be prompted to select the java version which you would like to use from now onwards.

  4. #4
    Just Joined!
    Join Date
    Jan 2009
    Posts
    15

    Smile thanks

    thanks a lot
    now the version got changed.
    thanks once again

Posting Permissions

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