Installing Java
- Download the latest stable JDK from here.
- RPM users (CentOS, RedHat, Fedora) should use the RPM builds.
- Non-RPM users (Debian, Ubuntu) should use the self extracting binary file.
- Remove the existing Java version.
- Install new Java version.
RPM Users
Install
- The RPM file I am using is jdk-6u
20-linux-x64-rpm.bin. - chmod +x jdk-6u
20-linux-x64-rpm.bin ./jdk-6u 20-linux-x64-rpm.bin
Remove Java
- In this example I am uninstalling jdk-6u16.
rpm -e sun-javadb-common-10.4.2-1.1 sun-javadb-client-10.4.2-1.1 sun-javadb-demo-10.4.2-1.1 sun-javadb-docs-10.4.2-1.1 jdk-1.6.0_16-fcs - This everything that was installed by the jdk-6u-linux-x64-rpm.bin package.
NON-RPM Users
Install
- chmod +x jdk-6u20
-linux-x64-bin ./jdk-6u 20-linux-x64-.bin
- Find the installation directory. Assume it is installed in /usr/java/jdk1.6.0_16
- Since this was a self extracting install all you have to do is remove the directory and its contents using the command shown below.
- rm -rf /usr/java/jdk1.6.0_16
Remember to remove the system or update the system variable JAVA_HOME. (The /etc/profile file for CentOS users).
Overview of JDK and JRE file structure here
No comments:
Post a Comment