Source: https://foxhop.net/f3d58942-2f95-11f1-a5d7-e86a64d24d78/alternatives-and-java-versions
Snapshot: 2026-05-31T04:23:03Z
Generator: Remarkbox 1527ef7

This is a thread snapshot. The living document lives at the source URI above — it may have been edited, extended, or replied-to since.

Scan for living source

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

Source: https://foxhop.net/f3d58942-2f95-11f1-a5d7-e86a64d24d78/alternatives-and-java-versions
Snapshot: 2026-05-31T04:23:03Z
Generator: Remarkbox 1527ef7