카테고리 없음

(Ubuntu JDK) 우분투 Install JDK

클레인 2017. 11. 29.
반응형

우분투에 java 를 설치하기.


1. Install OpenJdk


 

$ sudo apt-get install openjdk-7-jdk

 


2. Install Oracle java7 jdk




$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-jdk7-installer

 


2-1. Install Oracle java7 jdk Manually


 

$ cd ~
$ cd 다운로드/
$

 

Unzip Download JDK File

 

$ tar zxvf jdk-7u7-linux-i586.tar.gz

 

Normally locate java PATH is /use/lib

 

$ sudo mkdir -p /usr/lib/jvm/jdk1.7.0

 

move jdk1.7.0  file

 

$ sudo mv jdk1.7.0_07/* /usr/lib/jvm/jdk1.7.0/

 

add  java to system 

 

$ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1

 

add javac and javaws

 

$ sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
$ sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1

 

Let's execute jdk

 

$ java -version

 

반응형

댓글