JDK 설치 및 변경 (Ubuntu 11.10, 14.10LTS)


우분투 버전 확인

cat /etc/lsb-release
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk

선택적으로 아래와 같이 변경 할 수 있다.

sudo update-alternatives --config java
sudo update-alternatives --config javac

원하는 JDK를 선택한다.

Openjdk-7-jdk Lolli-POP
Java 6: for Gingerbread through KitKat
Java 5: for Cupcake through Froyo
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      auto mode
  1            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
  2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1069      manual mode

Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual mode
root@jemin-virtual-machine:~# update-alternatives --config javac
There are 2 choices for the alternative javac (providing /usr/bin/javac).

  Selection    Path                                         Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-7-openjdk-amd64/bin/javac   1071      auto mode
  1            /usr/lib/jvm/java-7-openjdk-amd64/bin/javac   1071      manual mode
  2            /usr/lib/jvm/java-8-openjdk-amd64/bin/javac   1069      manual mode

Press enter to keep the current choice[*], or type selection number: 2


'Computer Science > Linux and MAC 사용법' 카테고리의 다른 글

Samba 이용한 공유 디렉터리 만들기  (0) 2015.07.09
Ubuntu 한글 설정  (0) 2015.04.26
vi와 vim 연결하기  (0) 2014.10.31
리눅스 터미널 이름 변경 방법  (0) 2014.10.31
리눅스 명령어 정리  (0) 2014.10.25

+ Recent posts