Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java installation problem in ubuntu

 
Prasath Premkumar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48363
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Open a terminal in ubuntu, and type in the following:

sudo update-java-alternatives -s java-6-sun
 
Campbell Ritchie
Sheriff
Posts: 48363
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your solution sounds better than mine, Dawn
 
Dawn Charangat
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot CR...

I treat it as a huge compliment coming from a person like you.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15203
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Prasath Premkumar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic