简体   繁体   中英

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM