This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes java installation problem in ubuntu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "java installation problem in ubuntu" Watch "java installation problem in ubuntu" New topic
Author

java installation problem in ubuntu

Prasath Premkumar
Ranch Hand

Joined: Nov 13, 2008
Posts: 43
Hi,

I tried to install java6 in ubuntu 8.04 using jdk-6u3-linux-i586.bin. (downloaded from sun website)

when i try to run the file :

sh jdk-6u3-linux-i586.bin

i got error saying ./install.sfx.nnnn: not found.

The file didnt extracted. Then i changed the file name from .bin to .zip & extracted it manually.

After that when i try to run i got error saying :

jdk1.6.0_13/bin/unpack200: not found
jre/lib/rt.jar
Installation failed.

what can i do to get this fixed & install java properly?
I need help in this matter.
Thanks in advance.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38044
    
  22
Do you need to use "sh" when installing Java on Ubuntu? Whenever I have installed Java on Ubuntu, I have followed the instructions here, using the "self-extracting" version (not RPM, which doesn't work well on Ubuntu). It has always worked for me. Remember you have to update your PATH which is probably easiest done by editing the .bashrc file in your home folder to add a line like

export PATH=/usr/java/jdk1.6.0_13/bin:$PATH

assuming you put your installation in /usr/java. If that doesn't work, checking the installation size and maybe a new download may be necessary.
Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
Open a terminal in ubuntu, and type in the following:

sudo update-java-alternatives -s java-6-sun
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38044
    
  22
Your solution sounds better than mine, Dawn
Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
Thanks a lot CR...

I treat it as a huge compliment coming from a person like you.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

Note that the preferred way to install software on Ubuntu (and on other Linux distributions) is by using the package management system specific to your distro, instead of installing software manually. Sun Java 6 is available in the Ubuntu software repository, and you can install the JDK by installing the package sun-java6-jdk by using Synaptic, or by entering the following command:

sudo apt-get install sun-java6-jdk

After installing it that way, to make sure that Sun Java 6 is the default version of Java that's used on your system, use Dawn's command:

sudo update-java-alternatives -s java-6-sun


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Prasath Premkumar
Ranch Hand

Joined: Nov 13, 2008
Posts: 43

Thanks a lot for all your help.

I also prefer to use apt-get but since i dont have access to internet at home , i cldnt do that.

I checked the file size and it looks ok.

But still i get that issue.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java installation problem in ubuntu
 
Similar Threads
JDK1.5 installation failed on ubuntu linux 11.10 server
How to install SUN JDK1.6 on Fedora
Got problem when trying to install JDK5.0 on linux
problem installing java
Got problem when trying to install JDK5.0 on linux