How to install Java on Linux

 This is how I install java on Linux if you don't want to install it using yum.

download java from http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase14-419411.html
jre-1_5_0_12-linux-amd64.bin
chmod +x jre-1_5_0_12-linux-amd64.bin
./jre-1_5_0_12-linux-amd64.bin
[root@duim001zatcrh ~]# alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.5.0_12/bin/java 1
[root@duim001zatcrh ~]# alternatives --install /usr/bin/java java /usr/java/jre1.5.0_12/bin/java 2
[root@duim001zatcrh ~]# alternatives --config java

There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
   2           /usr/lib/jvm/jre1.5.0_12/bin/java
   3           /usr/java/jre1.5.0_12/bin/java

Enter to keep the current selection[+], or type selection number: 2
[root@duim001zatcrh ~]#
[root@duim001zatcrh ~]#
[root@duim001zatcrh ~]# java -version
java version "1.5.0_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_12-b04, mixed mode)
[root@duim001zatcrh ~]#

Comments

Popular posts from this blog

Push command for NetWorker Client Upgrade

Factors Affecting Users’ Sense of Security and Trust in Integrating Electronic health record to the cloud

Basic Elastic Cloud Storage Troubleshooting Commands