This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes How do I install Java on Red Hat Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "How do I install Java on Red Hat Linux" Watch "How do I install Java on Red Hat Linux" New topic
Author

How do I install Java on Red Hat Linux

Herbert Maosa
Ranch Hand

Joined: May 03, 2000
Posts: 289
I just finished downlading the java2 sdk for linux. Hopefully I have donwloaded the correct one for linux (j2sdk-1_4_0-linux-i386.rpm.bin). I downloaded it into /bin.
I would appreciate if someone would tell me, how I execute this file to install my java compiler.
Thanks in advance, I am waiting patiently.....
Herbert.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

chmod 777 j2sdk-1_4_0-linux-i386.rpm.bin
then....
./j2sdk-1_4_0-linux-i386.rpm.bin
you will get a liscense agreement that scrolls about 8 screens, then you will have to type YES.
This will extract the file to:
j2sdk-1_4_0-linux-i386.rpm
then as ROOT do this:
rpm -i j2sdk-1_4_0-linux-i386.rpm
Set your environment variables and you are done.


GenRocket - Experts at Building Test Data
Herbert Maosa
Ranch Hand

Joined: May 03, 2000
Posts: 289
Thanks Greg.
I have followed your instructions and so far so good. But now in setting my environment variables, what directory do I point them to since the install does not tell me where it is putting the files in. Also, once this is done, do I invoke the compiler the same way as in windows, that by just typing javac?

Thanks for your help.
Herbert
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

The defualt install path for java in linux is /usr/java/j2sdk......
How else did you invoke the compiler in windows? I always use javac along with other tags for my classpath, etc. In Windows and Linux. It is the same.
Don't really know what you meant by that last statement.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16022
    
  20

Easy way to find out went where:
rpm -ql j2sdk
In place where you set up environment (such as ~/.bash_profile):
export JAVA_HOME=/usr/java/$$$$$$
export PATH=$PATH:/usr/java/$$$$$$/bin
Substitute "$$$$$$" with the actual java home, such as "j2sdk1.4.0".


Customer surveys are for companies who didn't pay proper attention to begin with.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How do I install Java on Red Hat Linux