Instalar el paquete java-package
# apt-get install java-package fakeroot
Descargar el archivo de Java de la siguiente dirección :
Description-en: Utility for creating Java Debian packages This package provides the capability to build a Debian package from a Java binary distribution by running make-jpkg <java binary archive file>. (with archive files downloaded from providers listed below) . Supported java binary distributions currently include: * Oracle (http://www.oracle.com/technetwork/java/javase/downloads) : - The J2SE Development Kit (JDK), version 6 (update >= 10), 7 - The J2SE Runtime Environment (JRE), version 6 (update >= 10), 7 - The J2SE API Javadoc, version 6 (update >= 10), 7 (Choose tar.gz archives or self-extracting archives, do _not_ choose the RPM!) . Please note that Debian recommends the use of openjdk-6-jdk/openjdk-6-jre or openjdk-7-jdk/openjdk-7-jre. java-package will install non-free packages. Note the link in the package description is broken.
Next download the appropriate .bin Download
Go to http://java.com and click on the Download button There are two types of installation packages. Linux self extracting binary file This file can be used to install Java in a location chosen by the user and can be installed by anyone (not only root users). As long as you are not root user, it cannot displace the system version of the Java platform suppled by Linux. Linux RPM package Linux RPM (Redhat Package Manager) uses RPM to install Java. In order to use this method, you need to have RPM available on your system. Otherwise use the other option.
We want the Linux (self-extracting file) , pick the one for your system there is a 32bit and 64bit. I run 32bit so I downloaded jre-6u31-linux-i586.bin.
cd to the directory where you downloaded it to. CODE: SELECT ALL cd /home/craig/Downloads/java/
then run: CODE: SELECT ALL fakeroot make-jpkg <java-binary-package-name>.bin
once that finishes you use dpkg to install the newly created .deb CODE: SELECT ALL dpkg -i oracle-j2re1.6_1.6.0+update31_i386.deb
Now you need to make sure you are using the right Java. Run the following commands as root: CODE: SELECT ALL update-alternatives –config java update-alternatives –config javac
Last but not least, symlink Java CODE: SELECT ALL cd /usr/lib/mozilla/plugins/
Followed by : CODE: SELECT ALL ln -s /usr/lib/jvm/j2re1.6-oracle/lib/i386/libnpjp2.so
Now we can go check Iceweasel/Firefox/Chrome etc, about:plugins it should show something like: Java(TM) Plug-in 1.6.0_31
File: /usr/lib/jvm/j2re1.6-oracle/lib/i386/libnpjp2.so
You can also check in a terminal to make sure the correct Java is being used: CODE: SELECT ALL $ java -version java version “1.6.0_31” Java(TM) SE Runtime Environment (build 1.6.0_31-b04) Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)
See what Java versions are installed: CODE: SELECT ALL # update-java-alternatives –list j2re1.6-oracle 314 /usr/lib/jvm/j2re1.6-oracle java-1.6.0-openjdk-i386 1061 /usr/lib/jvm/java-1.6.0-openjdk-i386
Basically 6 steps 1) Install java-package and fakeroot 2) download from Oracle 3) run make-jpkg 4) Install with dpkg 5) Update java-alternatives 6) symlink browser plugin
For more info see: How to Install Sun Java on Debian - http://www.crazysquirrel.com/computing/debian/java.jspx Java - Debian Wiki - http://wiki.debian.org/Java Java/Sun - Debian Wiki - http://wiki.debian.org/Java/Sun JavaPackage - Debian Wiki - http://wiki.debian.org/JavaPackage