Login or register    
Website screenshot service | LinkPeek.com

alternatives and java versions

This post discusses the alternatives utility by showing how to maintain multiple java versions side-by-side.

My os is fedora 18 x64 but I need java 32bit so I installed it from official oracle site.

which java
/usr/bin/java

# display
sudo alternatives --display java

# alternatives --install <link> <name> <path> <priority>
sudo alternatives --install /usr/bin/java java /usr/java/latest/bin/java 15

# configure java to use newly installed version
sudo alternatives --config java

  There are 2 programs which provide 'java'.

    Selection    Command
    -----------------------------------------------
    *  1           /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
     + 2           /usr/java/latest/bin/java

    Enter to keep the current selection[+], or type selection number: 2

# display
sudo alternatives --display java

Comments

Leave a comment

Please login or register to leave a comment!