Find the answer to your Linux question:
Results 1 to 7 of 7
I installed the latest Java from Sun - ( 1.5.0_11 ) and i tested the installation in Mozilla after linking the installation to my browser and it works fine... However ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2006
    Posts
    13

    Uninstalling Redhat Java


    I installed the latest Java from Sun - ( 1.5.0_11 ) and i tested the installation in Mozilla after linking the installation to my browser and it works fine...

    However when i do a java -version i am still getting the Redhat Version appearing. I need the default Java VM to be my installation from SUN in order to run my java applications from JBoss...

    Any ideas on if I have to remove the Redhat or if there is another way to make my computer use the installation from Sun Instead?

  2. #2
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    It's probably just a matter of symlinks. More than likely your current system points the java command to the gcj compiler instead of your Java SDK. You should be able to point it to the proper VM using the ln command, like this:

    Code:
    ln -s /bin/java /path/to/Sun/JavaVM/bin/java
    You might first have to remove the link in /usr/bin, and if so you'll need to do that while logged in with root privileges. Also keep in mind that I'm suggesting this off the top of my head, so I'd verify it first via the man pages for ln:

    Code:
    man ln
    Registered Linux user #270181
    TechieMoe's Tech Rants

  3. #3
    Just Joined!
    Join Date
    Apr 2006
    Posts
    13

    doesnt seem to work...

    That just returns these results:

    [root@localhost ~]# ln -s /bin/java/ /opt/jre1.5.0_11/bin/java_vm
    ln: `/opt/jre1.5.0_11/bin/java_vm': File exists
    [root@localhost ~]#

    At any case i would like to do it the clean way and remove the old JVM and install the new one from sun completely.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Quote Originally Posted by luke802
    That just returns these results:

    [root@localhost ~]# ln -s /bin/java/ /opt/jre1.5.0_11/bin/java_vm
    ln: `/opt/jre1.5.0_11/bin/java_vm': File exists
    [root@localhost ~]#
    The symlink should point to /bin/java, not /bin/java/. Also, you should be linking to /opt/jre1.5.0_11/bin/java, not the java_vm file. Your command should look something like this:

    Code:
    ln -s /bin/java /opt/jre1.5.0_11/bin/java
    Registered Linux user #270181
    TechieMoe's Tech Rants

  6. #5
    Just Joined!
    Join Date
    Apr 2006
    Posts
    13
    I used the unlink /usr/bin/java command and this completely removed the java file in that directory. (which, yes, was symbolically linked to the redhat java version). However now i try to execute the same command

    ln -s /usr/bin/java /opt/jre1.5.0_11/bin/java

    I get `/opt/jre1.5.0_11/bin/java': File exists...

    What does "File Exists" mean??? And how do i recreate the sym link file "java" in /usr/bin/?

    seems like i screwed up

  7. #6
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Oh.. Hmm.. Well perhaps I have my terms reversed. Try this one instead:

    Code:
    ln -s /opt/jre1.5.0_11/bin/java /bin/java
    I always forget which is the target and which is the destination.
    Registered Linux user #270181
    TechieMoe's Tech Rants

  8. #7
    Just Joined!
    Join Date
    Apr 2006
    Posts
    13
    Okay... fixed el problemo.

    ln -s /opt/jre1.5.0_11/bin/java /usr/bin/java

    insteal of ln -s /usr/bin/java /opt/jre1.5.0_11/bin/java.

    and voila... thanks very much guys.

Posting Permissions

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