 For DebianEtch/Backports, Sun Java is now a package in non-free. Either install the Java development kit:
#apt-get install sun-java6-jdk
or the Java runtime environment
#apt-get install sun-java6-jre
sun-java6-plugin could be installed to active JVM in your Web browser like iceweasel See: http://www.olivierberger.com/weblog/index.php/2008/05/18/103-declaration-d-impot (in french) Sun Java 1.5 For DebianEtch, you will find Java 5 instead:
#apt-get install sun-java5-jdk
or the Java runtime environment
#apt-get install sun-java5-jre
Manual method (not recommended) 1) Go to the [J2RE] download page 2) Select the Linux self-extracting file 3) Save it to a suitable location (eg /tmp) 4) Move it to the path you want to run it from (eg. /usr/local )
#mv j2re* / usr/local/
and change to this directory:
#cd / usr/local
5) Run it - as root
#sh j2re-1_4_1_01-linux-i586.bin
6) This will prompt you for a licence agreement. Accept it 7) It will then create a folder j2re1.4.1_01/ 8) Then, in your Mozilla plugin directory (eg / usr/local/mozilla/plugins) , symlink libjavaplugin_oji.so to the appropriate folder in the j2re folder created above
# cd /usr/local/mozilla/plugins # ln -s /usr/local/j2re1.4.1_01/plugin/i386/ns610/libjavaplugin_oji.so libjavaplugin_oji.so
9) Restart mozilla and test the install - eg go to http://news.bbc.co.uk Other way, without plug-in browser installation 1) Download the latest JRE from http://java.sun.com 2) Install java-package and fakeroot
apt-get install java-package fakeroot
3) Build a deb of the JRE using
fakeroot make-jpkg <downloadedfilename>
4) Install the newly created .deb using
dpkg -i <deb filename>
5) Install the debian-specific java bits
[apt-get] install sun-j2re<yourversion>debian
By far the most time-consuming part of the process is going to be downloading the JRE and then waiting for the .deb to build. As long as you're not using dialup you should be able to have everything done in well under 30 mins. Configure your default Java version Sun recommends you update the alternatives system to have Sun's tools as the defult:
#update-java-alternatives -s java-6-sun
Or for java 5:
#update-java-alternatives -s java-1.5.0-sun
vi /etc/apt/sources.list deb ftp://ftp.debian.org/debian/ etch main contrib
#apt-get update #apt-get install java-package
* Installation Java - If you use amd64 achitecture you must have this file jdk-1_5_0_03-linux- amd64.bin you can download.
+To turn this into a Debian package you should run: #apt-get install fakeroot java-package
This command will first prompt for confirmation, then : Ask you for your name Ask you for your email address Display a license agreement: Press Space to scroll down, or q to quit. Type "yes" to indicate you agree with the terms. (The name, and email address, you give will be inserted into the ebian package information - and not sent to Sun.)
Log as normal user $fakeroot make-jpkg jdk-1_5_0_03-linux-amd64.bin
Log as root #dpkg -i sun-j2sdk1.5_1.5.0+update03_amd64.deb
Test it work or not #java --version
JAVA_HOME #JAVA_HOME=/usr/lib/j2sdk1.5-sun #export JAVA_HOME #JAVA_HOME=/usr/lib/java #export JAVA_HOME
dpkg -l |grep -i java
JAVA_HOME=/opt/jdk1.5.0_15/bin
#
fakeroot make-jpkg jdk-1_5_0_12-linux-i586.bin
dpkg -i sun-j2sdk1.5_1.5.0+update12_i386.deb
JAVA_HOME=/usr/lib/jvm/java-6-sun |