Linux/Java

From Omnia
Jump to: navigation, search

Manual Installation

Java

# RPM
sudo su -
cd /opt
# http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jdk-6u45-oth-JPR
# wget http://install.oeey.com/jdk-6u45-linux-x64-rpm.bin
wget http://install.oeey.com/jdk-6u45-linux-amd64.rpm
rpm -Uvh jdk-6u45-linux-amd64.rpm
ln -s /usr/java/jdk1.6.0_23 java
# Non-RPM
sudo su -
cd /opt
# http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jdk-6u45-oth-JPR
wget http://install.oeey.com/jdk-6u45-linux-x64.bin
chmod u+x jdk-6u45-linux-x64.bin
./jdk-6u45-linux-x64.bin
ln -s jdk1.6.0_45 java
echo "export JAVA_HOME=/opt/java" >> ~/.bashrc

Installation

Java SE JDK

sh jdk-6u25-linux-x64-rpm.bin

Installed to:

/usr/java/jdk1.6.0_25

Path:

export PATH=/usr/java/jdk1.6.0_25/bin:$PATH

Alternative

rpm -Uvh /path/to/binary/jdk-7u55-linux-x64.rpm
alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 200000
/usr/sbin/alternatives --display java
/usr/sbin/alternatives --config java

References: