9/14/2010

installin JDK and JRE gentoo way

had a task to install JDK and JRE on customer server. And when I found that on server Gentoo has been installed it was too late for me :) ( it is my first experience with Gentoo)

so there are the steps

1. update portage

#emerge --sync

2. install JDK/JRE

# emerge virtual/jdk
or
# emerge virtual/jre

3. Configuring JVM

 
list of java virtual machines
# java-config --list-available-vms
 
out put should be like:
# java-config --list-available-vms
The following VMs are available for generation-2:
1)      IcedTea6-bin 1.4.1 [icedtea6-bin]
2)      Sun JDK 1.5.0.20 [sun-jdk-1.5] (Build Only)
3)      Sun JDK 1.6.0.16 [sun-jdk-1.6]
set VM


(By handle (preferred))
# java-config --set-system-vm sun-jdk-1.6
Now using sun-jdk-1.6 as your generation-2 system JVM
(By number)
# java-config --set-system-vm 3
Now using sun-jdk-1.6 as your generation-2 system JVM


ref http://www.gentoo.org/doc/en/java.xml

No comments: