Version 1.6.x (a.k.a Java 6 Update x)
NOTE: Java 6 is scheduled to die (End of Life or EOL) in November 2012
As of April 27, 2012 the latest version of Java 6 is 1.6.0_32 (Version 6 Update 32).
According to Oracle, "This release includes bug fixes and performance improvements." No security patches.
First install java-package, and fakeroot.
Code: Select all
apt-get install java-package fakeroot
Note the link in the package description is broken.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.
Next download the appropriate .bin
We want the Linux (self-extracting file) , pick the one for your system there is a 32bit and 64bit.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.
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/
Code: Select all
fakeroot make-jpkg <java-binary-package-name>.bin
Code: Select all
dpkg -i oracle-j2re1.6_1.6.0+update31_i386.deb
Code: Select all
update-alternatives --config java
update-alternatives --config javac
update-alternatives --config javaws
Code: Select all
cd /usr/lib/mozilla/plugins/
Code: Select all
ln -s /usr/lib/jvm/j2re1.6-oracle/lib/i386/libnpjp2.so
it should show something like:
You can also check in a terminal to make sure the correct Java is being used:Java(TM) Plug-in 1.6.0_31
File: /usr/lib/jvm/j2re1.6-oracle/lib/i386/libnpjp2.so
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)
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
Java - Debian Wiki
Java/Sun - Debian Wiki
JavaPackage - Debian Wiki
How do I download and install Java for my Linux computer? -Oracle guide
If you run Ubuntu, Mint or other Ubuntu derivatives see:
Oracle (Sun) Java JRE for Ubuntu, Linux Mint and Debian
Java - Community Ubuntu Documentation
Oracle Java7 , same steps as java 6 above
Download either the 32bit or 64bit tar.gz from:
http://www.oracle.com/technetwork/java/ ... 91157.html
Code: Select all
fakeroot make-jpkg /home/craig/Downloads/java/jre-7u4-linux-i586.tar.gz
Code: Select all
dpkg -i oracle-j2re1.7_1.7.0+update4_i386.deb
Code: Select all
update-alternatives --config java
update-alternatives --config javac
update-alternatives --config javaws
symlink the plugin : as root
Code: Select all
cd /usr/lib/mozilla/plugins/
Code: Select all
ln -s /usr/lib/jvm/j2re1.7-oracle/lib/i386/libnpjp2.so
Code: Select all
$ java -version
java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) Client VM (build 23.0-b21, mixed mode)
Version 1.7 (a.k.a Java 7)
As of April 27, 2012 the latest version of Java 7 is Update 4.
According to Oracle: "This release includes bug fixes and performance improvements, including a new JVM, Mac OS X support ... and more!" No security patches.