Project

General

Profile

Use alternative to switch JVM » History » Version 1

chin-yeh, 08/24/2010 10:46 AM

1 1 chin-yeh
h1. Use alternative to switch JVM
2
3
Below is the list of installed JDK:
4
* JDK 5 Update 15 (*Default*)
5
* JDK 6 Update 21 
6
7
h2. Switch JVM (java)
8
9
*DO NOT select the @Selection 1@*
10
<pre>
11
[root@cwyrnd3-server ~]# /usr/sbin/alternatives --config java
12
13
There are 3 programs which provide 'java'.
14
15
  Selection    Command
16
-----------------------------------------------
17
*  1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
18
 + 2           /usr/java/jdk1.5.0_15/bin/java
19
   3           /usr/java/jdk1.6.0_21/bin/java
20
21
Enter to keep the current selection[+], or type selection number:
22
</pre>
23
24
25
h2. Switch JVM compiler (javac)
26
27
<pre>
28
[root@cwyrnd3-server ~]# /usr/sbin/alternatives --config javac
29
30
There are 2 programs which provide 'javac'.
31
32
  Selection    Command
33
-----------------------------------------------
34
*  1           /usr/java/jdk1.6.0_21/bin/javac
35
 + 2           /usr/java/jdk1.5.0_15/bin/javac
36
37
Enter to keep the current selection[+], or type selection number:
38
</pre>