arjuncc
arjuncc

Reputation: 3287

Installing java 5 in ubuntu 11.04

i was trying to install java in ubuntu 11.04, i downloaded "jdk-1_5_0_22-linux-i586.bin" for this i used the tutorial this and this

# sudo mv jdk-1_5_0_22-linux-i586.bin /usr/lib/jvm
# cd /usr/lib/jvm
# chmod +x jdk-1_5_0_22-linux-i586.bin
# ./jdk-1_5_0_22-linux-i586.bin

when i execute the command # ./jdk-1_5_0_22-linux-i586.bin i do get the following error messages

Do you agree to the above license terms? [yes or no] 
y
Unpacking...
./jdk-1_5_0_22-linux-i586.bin: 394: cannot create install.sfx.3350: Permission denied
Checksumming...
/usr/bin/sum: install.sfx.3350: No such file or directory
expr: syntax error
expr: syntax error
chmod: cannot access `install.sfx.3350': No such file or directory
Extracting...
./jdk-1_5_0_22-linux-i586.bin: 424: ./install.sfx.3350: not found
mkdir: cannot create directory `jdk1.5.0_22/jre': No such file or directory
mkdir: cannot create directory `jdk1.5.0_22/jre/.systemPrefs': No such file or directory
touch: cannot touch `jdk1.5.0_22/jre/.systemPrefs/.system.lock': No such file or directory
chmod: cannot access `jdk1.5.0_22/jre/.systemPrefs/.system.lock': No such file or directory
touch: cannot touch `jdk1.5.0_22/jre/.systemPrefs/.systemRootModFile': No such file or directory
chmod: cannot access `jdk1.5.0_22/jre/.systemPrefs/.systemRootModFile': No such file or directory
cd: 751: can't cd to jdk1.5.0_22

am new to ubuntu environment, am trying to setup eclipse with Java EE.

Upvotes: 0

Views: 1675

Answers (3)

Kazekage Gaara
Kazekage Gaara

Reputation: 15052

You need permissions for it. You have two options, either switch into a super user mode, using:

#su

Though this method is not encouraged. The second and the most common and appropriate method is to use sudo command,as:

#sudo ./jdk-1_5_0_22-linux-i586.bin

Upvotes: 0

mishadoff
mishadoff

Reputation: 10789

Execute your bin with super user permission sudo. Also if you have newest version of JDK (I suppose you do) you can set compliance level of sources to 1.5

Upvotes: 0

Vivin Paliath
Vivin Paliath

Reputation: 95538

You should do sudo ./jdk-1_5_0_22-linux-i586.bin, since you don't have write permission in that directory. However, root does.

Upvotes: 2

Related Questions