Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top