wood burning stoves 2.0*
The moose likes Linux / UNIX and the fly likes how to install java on linux5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "how to install java on linux5" Watch "how to install java on linux5" New topic
Author

how to install java on linux5

rumana amin
Ranch Hand

Joined: May 02, 2010
Posts: 35

hello friends
i am facing problem in installation of java enterprise edition on linux5 os .please help me by sending step by step process of installation .
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15949
    
  19

What is a "linux5"? Do you mean Red Hat Enterprise version 5? CentOS 5? Something else?


Customer surveys are for companies who didn't pay proper attention to begin with.
rumana amin
Ranch Hand

Joined: May 02, 2010
Posts: 35

hello
yes i mean Red Hat Linux enterprise version 5.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15949
    
  19

You have 2 options:

1. Download the RPM-based (rpm.bin) package from Oracle/Sun and run it. It will unpack RPMs and install them.

2. Download the zip (or tgz?) archive from Oracle/Sun, make a directory to contain it (I recommend /usr/java), and unzip the archive there.

Both give the same net result. RPMs install by default to /usr/java. The main difference is that with RPM, the software is officially accounted for in the RPM database, which is handy for keeping inventory of what's installed on the machine.

Note that neither approach will setup the Sun Java as the default. There's an (incomplete) open-source java that's usually pre-installed with the OS, so if you type "java" at a command prompt without adding the installed JVM or JDK bin directory to your PATH, you'll get that java instead of the "real" java.
rumana amin
Ranch Hand

Joined: May 02, 2010
Posts: 35

hello tim
thanks a lot.i have installed rpm.bin on linux.it is successfully loaded.but don't know How to run first java program'hello world'.i'v tried so many times but not succeed.please tell me the write process to satrt running programs .
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

If you ran the rpm.bin, then it should have placed the JDK at /usr/local/jdk1.6.0_29, and given you a /usr/local/current (? not sure of that, don't have a Red Hat system handy right now) sym link to /usr/java/jdk_1.6.0_29. Also, it should have created a symlink named /usr/ban/java to /usr/java/current/bin/java. Use the ls command to verify this. The run "java -version" to also verify that it tells you the correct version number.


JBoss In Action
evan tanski
Greenhorn

Joined: Jan 06, 2012
Posts: 5
You will need to change it to /epel-release-5-4.noarch.rpm The very old 5.2 is not on the fedora el5 repo.
 
wood burning stoves
 
subject: how to install java on linux5
 
Similar Threads
Help with Java Installation
Install Tomcat 6 on Windows Check Settings and Permissions
JAX-WS clarification
Running the admin client
Automaticallly Installing Webstart