Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Linux (http://www.go4expert.com/articles/linux/)
-   -   Installing Java on your Linux box (http://www.go4expert.com/articles/installing-java-linux-box-t3645/)

pradeep 27Mar2007 18:04

Installing Java on your Linux box
 
Java is a fairly important technology to have on any operating system. Countless Web sites make use of Java or JavaScript; programs such as Zend Studio are Java applications that require the Java Runtime Environment; and many developers develop in Java. Unfortunately, most Linux distributions do not ship with Java due to its license fee. Certain Java implementations are free, such as GCJ, or the GNU Compiler for Java, but it isn't Sun's Java implementation, which is arguably the better of the two.

Luckily, installing Java on your Linux system is extremely simple. Visit the Java download Web site and select the operating system you'd like to download for (Linux, Linux AMD64, Solaris, etc.). Once you've chosen the download file—either a self-extracting executable or a self-extracting RPM file—you can install it.
Code:

# mkdir -p /usr/local/java
 
 # cd /usr/local/java
 
 # mv /path/to/jre-1_5_0_05-linux-amd64.bin .
 
 # chmod u+x jre-1_5_0_05-linux-amd64.bin
 
 # ./jre-1_5_0_05-linux-amd64.bin

The installation must be done as root if you want the Java installation to be site-wide; if you want it just for yourself, you can extract the package in ~/bin/java or some other appropriate location. In the above, the JRE is installed in /usr/local/java/jre1.5.0_05/.

As a quick test, run the java executable:
Code:

# cd jre1.5.0_05/bin
 
 # ./java -version

To make Java available to all users, add it to the default PATH settings by editing /etc/profile and adding:
Code:


 PATH=$PATH:/usr/local/java/jre1.5.0_05/bin
 
 JAVA_HOME=/usr/local/java/jre1.5.0_05
 
 export $PATH $JAVA_HOME


napster_hacker17 24Nov2009 20:00

Re: Installing Java on your Linux box
 
excellent...

jhon_lewis 13Mar2010 01:12

Re: Installing Java on your Linux box
 
Thanks

Corwin 7Jun2010 23:21

Re: Installing Java on your Linux box
 
Yep, this is all you need :-)

unni krishnan.r 8Jun2010 07:25

Re: Installing Java on your Linux box
 
aalso remind you java is now available int hte ubuntu software center availabe wih ubuntu


All times are GMT +5.5. The time now is 08:43.