Pasang JDK untuk Fedora 11

Sunday, September 27, 2009 | rizan

Salam,

Novice Linux user macam saya ni kena tulis nota banyak2 pasal selalu lupa. Ni macam mana nak setup JDK pulak. Hari tu dah install JDK 1.6 ni tapi tak boleh run java dr command prompt/console.

  1. Download latest JDK (http://java.sun.com/javase/downloads/index.jsp). Yang saya guna version 1.6.0_16 dan install jdk-6u16-nb-6_7_1-linux-ml.sh (macam yg saya guna ni)
  2. Cari lokasi JDK yg dah installed. # updatedb; locate javac | grep bin
    /usr/local/jdk1.6.0_16/bin/javac
  3. # alternatives -- install /usr/bin/java java /usr/local/jdk1.6.0_16/bin/java 100
  4. # alternatives -- install /usr/bin/javac javac /usr/local/jdk1.6.0_16/bin/javac 100
  5. # alternatives -- install /usr/bin/jar jar /usr/local/jdk1.6.0_16/bin/jar 100
  6. # /usr/sbin/alternatives --config java (dan buat utk ketiga2 command dan pilih yg sesuai)
  7. # java -version (utk lihat sama ada betul JDK yg installed)
Terima Kasih

0 Responses to "Pasang JDK untuk Fedora 11"


« Older Entries Newer Entries »