Install Java JRE/JDK in gentoo and sabayon

Question:  How  to install  Java  and  Java  plugins in  Sabayon or  gentoo ?

 Answer :

Install  JDK/JRE

emerge virtual/jdk.

to install your profile’s default JRE

emerge virtual/jre

Configuring your JDK/JRE

java-config –list-available-vms will give you a list of all available JREs and JDKs on your system

example :

# 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]  
*)      Sun JDK 1.6.0.16 [sun-jdk-1.6]

Setting the System VM

java-config --set-system-vm sun-jdk-1.6
Now using sun-jdk-1.6 as your generation-2 system JVM

Generate the profile.env

# env-update

Now is you new Vm system is activated

Install Java Browser Plugins

check the  available plugins

# eselect java-nsplugin list
[1]   sun-jre-bin-1.6
[2]   icedtea6-bin

Select the plugin you want

# eselect java-nsplugin set sun-jre-bin-1.6

Check the chosen plugin


# eselect java-nsplugin list
[1]   sun-jre-bin-1.6  current
[2]   icedtea6-bin

install the plugin for 64bit version


# echo "dev-java/sun-jre-bin nsplugin" >> /etc/portage/package.use
# emerge sun-jre-bin

Views, select and activate

 eselect java-nsplugin list
Available 32-bit Java browser plugins
[1]   emul-linux-x86-java-1.5
[2]   emul-linux-x86-java-1.6
Available 64-bit Java browser plugins
[1]   icedtea6-bin
[2]   sun-jre-bin-1.6

Chose the plugin you cant to use

(Choose the plugins for 32-bit and 64-bit browsers)
# eselect java-nsplugin set 32bit emul-linux-x86-java-1.6
# eselect java-nsplugin set 64bit sun-jre-bin-1.6


check the selected plugins


# eselect java-nsplugin list
Available 32-bit Java browser plugins
[1] emul-linux-x86-java-1.5
[2] emul-linux-x86-java-1.6
current Available 64-bit Java browser plugins
[1] icedtea6-bin
[2] sun-jre-bin-1.6 current

done.
Please shareShare on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0Share on Reddit0Digg thisShare on StumbleUpon0Share on VKBuffer this page