• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I install Java on Red Hat Linux

 
Herbert Maosa
Ranch Hand
Posts: 289
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Herbert Maosa
Ranch Hand
Posts: 289
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic