1. Download and updating packages
1.1 pre-requisites
$ yum install -y jpackage-utils
1.2 Download manualy from
2. Build packages
$ mkdir /opt
$ mkdir /opt/java
$ cd /opt/java
$ chmod a+x jdk-6u33-linux-i586-rpm.bin
$ ./jdk-6u33-linux-i586-rpm.bin
3) Create symbolic link to Java JDK 1.6
$ which javac
$ ls -la /usr/bin/javac
$ #backup
$ mv /usr/bin/javac /usr/bin/javac.bkp.2012-06-20
$ ln -s /usr/java/jdk1.6.0_33/bin/javac /usr/bin/javac
4) Test symbolic link to Java JDK 1.6
$ javac -version
$ cd /tmp
$ cat HelloWorld.java
class HelloWorld {
public static void main(String args[]) {
System.out.println("HelloWorld!");
}
}
$ javac -cp . HelloWorld.java
$ java -cp . HelloWorld
HelloWorld!
Nenhum comentário:
Postar um comentário