Java15
Java 1.5
Note: More instructions on how to install Java in Ubuntu are available on the [Java] page.
Installing Java 1.5
This information provides the four steps I used to install Java. The browser is a backported Firefox 1.0.
How to install Java on Ubuntu Linux with four commands
Add these two repositories to /etc/apt/sources.list
deb ftp://ubuntujava.yimports.com/ binary/ deb-src ftp://ubuntujava.yimports.com/ source/
And execute these commands:
% apt-get update % apt-get install java-ubuntu sun-j2sdk1.5.0
From KevinDavies Sat Jan 1 01:44:45 +0000 2005 From: Kevin Davies Date: Sat, 01 Jan 2005 01:44:45 +0000 Subject: Make sure you add multiverse to your apt-get sources or this will not
- work
Message-ID: <20050101014445+0000@https://www.ubuntulinux.org>
From CelsoPinto Sun Jan 23 01:49:32 +0000 2005 From: Celso Pinto Date: Sun, 23 Jan 2005 01:49:32 +0000 Subject: universe Message-ID: <20050123014932+0000@https://www.ubuntulinux.org>
You must enable the Universe repository for this to work
From JerryHaltom Sun Feb 6 08:35:07 +0000 2005 From: Jerry Haltom Date: Sun, 06 Feb 2005 08:35:07 +0000 Subject: Message-ID: <20050206083507+0000@https://www.ubuntulinux.org>
I just wanted to make sure you are aware that you are breaking your Sun license agreement by distributing this software. I do hope nobody tries to take you to court for it. I also want all of your users to be aware that they are only granted rights to use this software if they accept the Sun license agreement as listed on www.java.net.
From ChristopherBlack Mon Feb 14 17:09:51 +0000 2005 From: Christopher Black Date: Mon, 14 Feb 2005 17:09:51 +0000 Subject: Message-ID: <20050214170951+0000@https://www.ubuntulinux.org>
A much cleaner solution is to install java-package out of the multiverse, download the .bin file of the jre or jdk from Sun yourself and then run make-jpkg on the bin file to create a deb.
From GabrielBauman Thu Mar 10 19:05:42 +0000 2005 From: Gabriel Bauman Date: Thu, 10 Mar 2005 19:05:42 +0000 Subject: Actually Message-ID: <20050310190542+0000@https://www.ubuntulinux.org>
Jerry - These packages show the Sun licenses and require acceptance before they will install. The only legal problem is that of distribution.
From IFRFlyer Mon Apr 4 01:34:28 +0100 2005 From: IFRFlyer Date: Mon, 04 Apr 2005 01:34:28 +0100 Subject: Didn't work in 50.4/Hoary Message-ID: <20050404013428+0100@https://www.ubuntulinux.org>
None of above worked in 5.04/Hoary / i386 for me, but a helpful soul on IRC gave me this: Add deb ftp://ftp.tux.org/java/debian/ sarge non-free
to /etc/apt/sources.list
and then do
apt-get install j2re1.4 java-common
a complete description for newbies is here:
http://nickselby.com/articles/technology/index.htm?a=1806
Installing Sun's Java on Hoary (expanding on Gabriel Bauman's comment from above)
Download Sun's JDK (.bin format) from http://java.sun.com/j2se/1.5.0/download.jsp. Choose either the JDK or JRE link. Execute these commands (assuming you downloaded the file 'jdk-1_5_0_02-linux-i586.bin'):
% sudo apt-get install java-package fakeroot % fakeroot make-jpkg jdk-1_5_0_02-linux-i586.bin % sudo dpkg -i sun-j2sdk1.5_1.5.0+update02_i386.deb
Test installation:
% java -version java version "1.5.0_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09) Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode, sharing)
The "/java-web-start.applications: Permission denied" messages can be ignored when building the package. The above also works with jdk-1_5_0_03-linux-i586.bin under Hoary. -- rcs 07-May-2005
Installing Sun's Mozilla (-Firefox) Java Browser Plugin on Hoary
% sudo ln -s /usr/lib/j2re1.5-sun/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/ % sudo ln -s /usr/lib/j2re1.5-sun/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/
Restart the Browser and check with about:plugins in the Browser's URL-Field, whether the plugin has been recognized.
From EricDelevaux Wed Apr 20 20:40:56 +0100 2005 From: Eric Delevaux Date: Wed, 20 Apr 2005 20:40:56 +0100 Subject: . Message-ID: <20050420204056+0100@https://www.ubuntulinux.org>
Another way to check the java installation is the "Test your Java Virtual Machine (JVM)" page at http://www.java.com/en/download/help/testvm.xml. If you want to use the browser plugin after installing the JDK, use the commands above with /usr/lib/j2sdk1.5-sun/jre/plugin/i386/ns7/ as the path instead. -- rcs 07-May-2005
The path to libjavaplugin_oji.so should be
% sudo ln -s /usr/lib/sun-j2re1.5.0/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/
From EdwardClark Wed Apr 27 03:51:24 +0100 2005 From: Edward Clark Date: Wed, 27 Apr 2005 03:51:24 +0100 Subject: Correct Symlink statements for JDK / Firefox (Mozilla) Message-ID: <20050427035124+0100@https://www.ubuntulinux.org>
For those who followed the earlier assumption that the JDK was downloaded, the correct symlink statements for the Java Plugin are:
% sudo ln -s /usr/lib/j2sdk1.5-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/ % sudo ln -s /usr/lib/j2sdk1.5-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/
From JamesNg Sun Jun 5 09:34:11 +0100 2005 From: James Ng Date: Sun, 05 Jun 2005 09:34:11 +0100 Subject: Local installation of Sun's Java for Firefox 1.0.4 Message-ID: <20050605093411+0100@https://www.ubuntulinux.org>
I managed to follow the instructions of downloading the JDK, packaging the JDK, and then depackaging the .deb file. Everything worked according to plan except the last part where I had to install the plugin for Firefox. The 1.0.4 I have installed in my home directory and the soft link has to be created in the Firefox directory. My solution is:
% sudo ln -s /usr/lib/j2sdk1.5-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so <firefox directory>/plugins/
Hope this help...
From R(Chandra)Chandrasekhar Tue Jun 7 16:31:58 +0100 2005 From: R (Chandra) Chandrasekhar Date: Tue, 07 Jun 2005 16:31:58 +0100 Subject: Restoring Java plugin after Firefox upgrade Message-ID: <20050607163158+0100@https://www.ubuntulinux.org>
After upgrading to mozilla-firefox 1.0.4~5.04ubp1+1.0.2-0ubuntu1, I lost the use of my Java plugin. I also had installed sun-j2re1.5 and sun-j2sdk1.5. This is what I did to restore functionality:
1. ls -al /usr/lib/mozilla-firefox/plugins/libjavaplugin.so
gave
lrwxrwxrwx 1 root root 39 2005-06-06 17:00 /usr/lib/mozilla-firefox/plugins/libjavaplugin.so -> /etc/alternatives/firefox-javaplugin.so
This was a broken symlink.
2. ls -al /etc/alternatives/firefox-javaplugin.so
gave
lrwxrwxrwx 1 root root 58 2005-06-07 01:47 /etc/alternatives/firefox-javaplugin.so -> /usr/lib/j2sdk1.5-sun/plugin/i386/ns7/libjavaplugin_oji.so
3. cd /usr/lib/j2sdk1.5-sun/plugin/i386/ns7/
gave
bash: cd: /usr/lib/j2sdk1.5-sun/plugin/i386/ns7/: No such file or directory
4. dpkg -L sun-j2sdk1.5 | grep libjavaplugin_oji.so
gave
/usr/lib/j2sdk1.5-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/j2sdk1.5-sun/jre/plugin/i386/ns7-gcc29/libjavaplugin_oji.so
5. Conclusion: the directory jre, sandwiched between j2sdk1.5-sun and plugin was missing.
6. Solution:
sudo ln -sf /usr/lib/j2sdk1.5-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so /etc/alternatives/firefox-javaplugin.so
7. If you wish, you can also
sudo ln -sf /usr/lib/j2sdk1.5-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so /etc/alternatives/mozilla-javaplugin.so
and
sudo ln -sf /usr/lib/j2sdk1.5-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so /etc/alternatives/netscape-javaplugin.so
8. Check that symlinks are not dead; restart mozilla-firefox, type