By crmanski
I found that I was running a few versions behind on my linux desktop, but their was no updated package for the latest java. This is how I created a .deb package and installed it…
The commands commands below are all in a terminal. The latest version of Java may vary by the time you are following these instructions. Change the numbers in the file names as needed…
First I needed to install the package called “fakeroot” & “java-package”.
sudo apt-get install fakeroot java-package
Then I downloaded the linux installer from Sun’s site which is here…
http://www.java.com/en/download/manual.jsp
Change to the directory that your web browser saves to. Mine is /home/MyUserName/Downloads…
cd ~/Downloads
Make the file executable…
chmod a+x jre-1_5_0_10-linux-i586.bin
Run the fakeroot java package command…
fakeroot make-jpkg jre-1_5_0_10-linux-i586.bin
Follow the instructions that the installer asks you. When you are done there should be a Debian package in the same directory. Install it with this command…
sudo dpkg -i sun-j2re1.5_1.5.0+update10_i386.deb
Now update the systems configuration…
sudo update-alternatives –config java
It will say something like…
There are 3 alternatives which provide `java’.
Selection Alternative
———————————————–
1 /usr/bin/gij-wrapper-4.0
+ 2 /usr/lib/jvm/java-gcj/bin/java
* 3 /usr/lib/j2re1.5-sun/bin/java
Press enter to keep the default[*], or type selection number:
I chose #3. Your system might vary in what it lists here.
Confirm the version. If it matches, you did well. If not find a local Linux guru and ask them for help.
java -version
Mine said…
java version “1.5.0_10”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing
Thanks to this blog entry that helped me with this…
http://www.docuverse.com/blog/donpark/2005/11/25/ubuntu-breezy-installing-java-and-eclipse
Technology: