Project

General

Profile

Actions

Use alternative to switch JVM

Below is the list of installed JDK:
  • JDK 5 Update 15 (Default)
  • JDK 6 Update 21

Switch JVM (java)

DO NOT select the Selection 1

[root@cwyrnd3-server ~]# /usr/sbin/alternatives --config java

There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*  1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
 + 2           /usr/java/jdk1.5.0_15/bin/java
   3           /usr/java/jdk1.6.0_21/bin/java

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

Switch JVM compiler (javac)

[root@cwyrnd3-server ~]# /usr/sbin/alternatives --config javac

There are 2 programs which provide 'javac'.

  Selection    Command
-----------------------------------------------
*  1           /usr/java/jdk1.6.0_21/bin/javac
 + 2           /usr/java/jdk1.5.0_15/bin/javac

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

Updated by chin-yeh about 14 years ago · 1 revisions