[Gentoo Linux] Installing and configuring Java
The Gentoo Linux distribution offers a range of JRE and JDK environments. To install them simply procede as follows:
Installing JDK
To start the installation you must run the command:
# emerge virtual/jdk
or
# emerge virtual/jre
Note that: The installation of the JDK also includes the installation of the JRE.
Configuring the JVM
Use the command
# java-config --list-available-vms
The following VMs are available for generation-2:
1) Sun JDK 1.5.0.17 [sun-jdk-1.5]
*) Sun JDK 1.6.0.07 [sun-jdk-1.6]
</li></ul>
L'(*) indicates the virtual machine in use.
To change the virtual machine system must choose among the list of existing ones:
# java-config --set-system-vm sun-jdk-1.6