Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old October 15th, 2005   #1
Adamal
5 Cups of Ubuntu
 
Join Date: Apr 2005
Beans: 32
How to install Sun's Java

Since I haven't seen any how to's on how to install Sun's java (Any Version) I thought I'd write up a little how to.

First you will need to add all the extra repositories for Ubuntu. (ie Multiverse, Universe...) Please see other how to's on how to do that.

Now go to Sun's website http://java.sun.com and select the java jdk or jre that you want. In my case I needed 1.4.2 so I downloaded j2sdk-1_4_2_09-linux-i586.bin.

Then run the following commands from the terminal:

First install the required packages:
sudo apt-get install fakeroot java-package java-common
Create the Deb file for the install:
fakeroot make-jpkg jre-1_5_0_05-linux-i586.bin
Install The deb file
sudo dpkg -i sun-j2re1.5_1.5.0+update05_i386.deb
Now make Sun's java the default by running this command and selecting it.
sudo update-alternatives --config java

I hope that helps.

The instructions above are dated, please do not use them. Use the following instead:
Execute one of the following:
sudo apt-get install sun-java6-jdk - For the JDK (Developer)
sudo apt-get install sun-java6-jre - For the JRE (User)

Last edited by Adamal; July 1st, 2008 at 11:09 AM..
Adamal is offline   Reply With Quote
Old October 15th, 2005   #2
Arktis
Quad Shot of Ubuntu
 
Arktis's Avatar
 
Join Date: Jan 2005
Beans: 290
Re: How to install Sun's Java

Edit: removed alternate method and added to it's own thread. I also mentioned here that I didn't see java-package in the repos.
__________________
...

Last edited by Arktis; October 15th, 2005 at 04:32 PM..
Arktis is offline   Reply With Quote
Old October 15th, 2005   #3
Adamal
5 Cups of Ubuntu
 
Join Date: Apr 2005
Beans: 32
Re: How to install Sun's Java

Yes java-package is in the repositories. Here is my sources.list

Quote:
deb cdrom:[Ubuntu 5.10 _Breezy Badger_ - Release i386 (20051012)]/ breezy main restricted


deb-src http://us.archive.ubuntu.com/ubuntu breezy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu breezy-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu breezy-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb-src http://us.archive.ubuntu.com/ubuntu breezy universe

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://us.archive.ubuntu.com/ubuntu breezy-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu breezy-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu breezy-security main restricted
deb-src http://security.ubuntu.com/ubuntu breezy-security main restricted

# deb http://security.ubuntu.com/ubuntu breezy-security universe
# deb-src http://security.ubuntu.com/ubuntu breezy-security universe

deb http://us.archive.ubuntu.com/ubuntu/ breezy universe main restricted multiverse
Adamal is offline   Reply With Quote
Old October 15th, 2005   #4
bored2k
Skinny Extra Sweet Ubuntu
 
bored2k's Avatar
 
Join Date: Feb 2005
My beans are hidden!
Re: How to install Sun's Java

The above is not the default sources.list. We should assume the user is starting from zero .
bored2k is offline   Reply With Quote
Old October 15th, 2005   #5
Adamal
5 Cups of Ubuntu
 
Join Date: Apr 2005
Beans: 32
Re: How to install Sun's Java

Re-read my first post. You will see that I stated that you will need to add the extra repositories.

Last edited by Adamal; October 15th, 2005 at 05:06 PM..
Adamal is offline   Reply With Quote
Old October 15th, 2005   #6
Arktis
Quad Shot of Ubuntu
 
Arktis's Avatar
 
Join Date: Jan 2005
Beans: 290
Re: How to install Sun's Java

Yeah, sorry about that. I finished editing up my alternate method if you want to check that out. 'Twas an educational experience... probably nobody will use it.
__________________
...
Arktis is offline   Reply With Quote
Old October 16th, 2005   #7
odie5533
5 Cups of Ubuntu
 
Join Date: Jun 2005
Beans: 16
Re: How to install Sun's Java

I get the following error:
Code:
fakeroot make-jpkg jdk-1_5_0_05-linux-i586.bin
Creating temporary directory: /tmp/make-jpkg.XXXXV5OMN4
Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk-doc.sh j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk-doc.sh sun-j2sdk.sh

No matching plugin was found.
Removing temporary directory: done
odie5533 is offline   Reply With Quote
Old October 16th, 2005   #8
bionnaki
Dark Roasted Ubuntu
 
Join Date: Aug 2005
Beans: 1,028
Re: How to install Sun's Java

just curious.
how would one uninstall this?
bionnaki is offline   Reply With Quote
Old October 16th, 2005   #9
noxfu
First Cup of Ubuntu
 
Join Date: Nov 2004
Beans: 3
Re: How to install Sun's Java

Quote:
Originally Posted by bionnaki
just curious.
how would one uninstall this?
Code:
dpkg -l |grep -i java
You will see that "sun-j2re1.5" is the package you're looking for.

Code:
sudo apt-get remove sun-j2re1.5
That's it.
__________________
noxfu

"Progress doesn't come from early risers --
progress is made by lazy men looking for
easier ways to do things."
-- Lazarus Long
noxfu is offline   Reply With Quote
Old October 16th, 2005   #10
kvidell
Dipped in Ubuntu
 
kvidell's Avatar
 
Join Date: May 2005
Location: Fremont, California, USA
Beans: 532
Ubuntu 6.10 Edgy
Send a message via AIM to kvidell Send a message via MSN to kvidell Send a message via Yahoo to kvidell
Re: How to install Sun's Java

Why are we using fakeroot and not sudo? Or am I confused as to what fakeroot is/does?
- Kev
__________________
Reg. Linux User #389145
ThinkPad T42p running Breezy (with [Multi/Uni]verse, Marillat, Sarge, Cipherphunk and BMPx repos). All (sub)systems are a GO.
Kill all the Spiders to save the Butterflies. Is this what we call Eden?
Last.FM
kvidell is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:57 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry