Install Oracle Java JDK on CentOS 6.4

1. Download Oracle Java JDK  7u45 32-bit/64-bit RPM packages
#http://www.oracle.com/technetwork/java/javase/downloads/index.html. Select rpm

2.  Installation
2.1) rpm -Uvh jdk-7u45-linux-i586.rpm
2.2) Install Alternatives
alternatives –install /usr/bin/java java /usr/java/latest/jre/bin/java 200000
alternatives –install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 200000
alternatives –install /usr/bin/javac javac /usr/java/latest/bin/javac 200000
alternatives –install /usr/bin/jar jar /usr/java/latest/bin/jar 200000
2.3) More Alternatives 🙂
alternatives –install /usr/bin/java java /usr/java/jdk1.7.0_45/jre/bin/java 200000
alternatives –install /usr/bin/javaws javaws /usr/java/jdk1.7.0_45/jre/bin/javaws 200000
alternatives –install /usr/bin/javac javac /usr/java/jdk1.7.0_45/bin/javac 200000
alternatives –install /usr/bin/jar jar /usr/java/jdk1.7.0_45/bin/jar 200000
2.4)  Install new Java as alternative
alternatives –install /usr/bin/java java /usr/java/latest/bin/java 200000
alternatives –install /usr/bin/javaws javaws /usr/java/latest/bin/javaws 200000
3) Sanity check
java -version
java version “1.7.0_45”
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode, sharing)

Install Java EE 5 SDK on ubuntu 10.04

easy to do:

1) Download file from oracle

#wget “http://download.oracle.com/otn-pub/java/java_ee_sdk/5.0_01-ml/java_ee_sdk-5_01-linux-ml.bin”

or goto

http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-eesdk-419427.html

and find ‘java_ee_sdk-5_01-linux-ml.bin’

 

2) Run binary file like below

./j2sdk-1_4_2_05-linux-i586.bin

if you get below error go here

root@ubuntu:/usr/java# ./java_ee_sdk-5_01-linux.bin
./java_ee_sdk-5_01-linux.bin: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

3) Rest is just a breeze, all GUI.

hope it helps you.

[Solved] j2sdk-1_4_2_05-linux-i586.bin tail: cannot open `+486′ for reading: No such file or directory ERROR

Solution

1. rm the old binary installer

rm j2sdk-1_4_2_05-linux-i586.bin

2. Run this Export

export _POSIX2_VERSION=199209

3. Download installer again and execute

./j2sdk-1_4_2_05-linux-i586.bin

I was able to get it working by following above steps. Let me know how it went for you.