1. JDK download
http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u4-downloads-1591156.html
바뀔 수도 있고... ㅎㅎㅎ tar파일을 받는다...
jdk-7u4-linux-x64.tar.gz 이런거... 난 64bit 10.10 ubuntu...
2. extract the file to the directory "/usr/lib/jvm/jdk1.7.0_04"
no matter with the name of directory....
3. just do this
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_04/jre/bin/java" 1
4. and this....
sudo update-alternatives --config java
5. you can see the selection menu
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/jdk1.7.0_04/jre/bin/java 1 manual mode
Press enter to keep the current choice[*], or type selection number:
6. enter 2!!!
7. set environment variables....
add this to .bashrc
export JAVA_HOME=/usr/lib/java/jdk1.7.0_04
export PATH=/usr/java/bin/:$JAVA_HOME:$PATH
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib
That's it.
안되면 : http://www.wikihow.com/Install-Oracle-Java-on-Ubuntu-Linux
'DIGITory > Ubuntu' 카테고리의 다른 글
Ubuntu installation - Partition (우분투 설치 - 파티션) (1) | 2012.08.10 |
---|---|
rename - 우분투 파일 이름 변경 (1) | 2012.05.12 |
Sharing directories between Ubuntu PCs (2) | 2012.04.28 |
Ubuntu - Nvidia driver (1) | 2012.04.26 |
Resolved : "E: Archive directory /var/cache/apt/archives/partial is missing." (1) | 2012.04.26 |