ubuntu, debian - install oracle jdk instead of openjdk



1) download oracle jdk from java.oracle.co

     32bit: jdk-6u45-linux-x32.bin
     64bit: jdk-6u45-linux-x64.bin

2) extract tar.gz file to WHERE_TO_INSTALL (just run the XXXX.bin file)
    In my case, I extracted it to /usr/local/jdk1.6.0_45

3) make soft link "java" to /usr/local/jdk1.6.0_45

    sudo ln -s /usr/local/jdk1.6.0_45/  /usr/local/java

4) change default jdk

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/bin/java" 1

sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/bin/javac" 1

sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/bin/javaws" 1

sudo update-alternatives --config java  ==> select just installed java path

sudo update-alternatives --config javac  ==> select just installed javac path

sudo update-alternatives --config javaws  ==> select just installed javaw path


Done. It should work.......

댓글

이 블로그의 인기 게시물

ubuntu에서 samba로 파일 공유하기

화이트해커를 위한 암호와 해킹

Shell Program(1) 변수, 상수