Mau dapat tambahan income hanya dengan upload file, [ disini ]

Install Java Development Kit (JDK) on CentOS

Author hery Category

(1) Download JDK terbaru Java SE Development Kit 6 Update 25 dan pilih JDK 6 untuk linux RPM

(2) Install JDK
[root@pst /] chmood 700 jdk-6u24-linux-i586-rpm.bin
[root@pst /] ./jdk-6u24-linux-i586-rpm.bin

##### read terms of use #####

Do you agree to the above license terms? [yes or no]
yes
# agree

###################################


For more information on what data Registration collects and
how it is managed and used, see:
http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html

Press Enter to continue.....

Done.

(3) Setting path profile linux
[root@pst /]#vim /etc/profile

# tambahkan baris berikut di baris paling bawah
export JAVA=/usr/java/default
export PATH=$PATH:$JAVA/bin
export CLASSPATH=.:$JAVA/jre/lib:$JAVA/lib:$JAVA/lib/tools.jar

[[root@pst /] source /etc/profile

(4) SELESAI

Langkah selanjutnya test JDK yang telah di install.
[root@pst home]#vim hello.java


public class hello {

public static void main(String[] args) {

System.out.println("install JDK sukses");

for (int i=0; i<3; i++) {

System.out.println("angka ke"+i);

}

}

}


[root@pst home]#javac hello.java

[root@pst home]#java hello

install JDK sukses

angka ke1

angka ke2

angka ke3

Jika muncul "install JDK sukses" maka JDK anda telah berhasil terinstall.

๑۩۞۩๑ Ilmu untuk dipelajari, dibagi dan diamalkan ๑۩۞۩๑
Selengkapnya.. - Install Java Development Kit (JDK) on CentOS

Theme by New wp themes | Bloggerized by Dhampire