File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes Having some problem with redhat installation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Having some problem with redhat installation" Watch "Having some problem with redhat installation" New topic

Having some problem with redhat installation

northfield Sid
Ranch Hand

Joined: Aug 08, 2002
Posts: 106
I have needed to change my linux version to redhat.
I have downloaded the j2se called
At command prompt type
After agreeing to the license it opened a directory:
(1) j2sdk1.4.1
iside this directory 1 hidden file called
(2) j2sdk-1_4_1-beta-linux-i586-rpm
At command prompt typed:
$ rpm -iv j2sdk-1_4_1-beta-linux-i586-rpm
Preparing packages for installation ...
But there is no folder called j2sdk-1.4.1-beta
Nor is there anything in the folder j2sdk1.4.1
What can I do?
Please help
James O'Dell

Joined: Apr 29, 2002
Posts: 16
An RPM file will not unpack like a tar (which seems to be what you are expecting). You can see where files were installed by using the following command:
rpm -ql jdk
I believe Red Hat installs the jdk in /usr/java
northfield Sid
Ranch Hand

Joined: Aug 08, 2002
Posts: 106
Thank you vert much James O'Dell
I am very greatful. Yes indeed you are correct. Please note I have read the j2se documentation and followed there installation instruction for linux at this url: Unless one has used linux redhat before one could not know where it installs these programs???
I believe I can follow instruction but Sun are sometimes inconsiderate for some mere mortal users? If they provided this then I would not need to be so concerned.
Another Question:
I just want to make sure everything I will be doing is correct. If I wanted to execute the java and javac commands from any where, would I edit the .bash_profile file? My OS is Linux Redhat 7.2
If so I have three of these files located at
(1) /var/lib/nfs/.bash_profile
(2) /etc/skel/.bash_profile
(3) /home/sid/.bash_profile
Which one should I edit?
Here is my bash_profile located at /home/sid/.bash_profile:
# Get the aliases and functios
if [ -f ~/bashrc ]; then
. ~/.bashrc
# user specific aliases and functions and startup programs
export PATH
unset Username
I believe I have to set the environment path???
export PATH=$PATH:/usr/java/j2sdk1.4.1/bin
If so where in the above file should I type this?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16618

Here's a real-world .bash_profile I use. The only unusual thing is the stuff relating to the EJBWizard. The JOnAS stuff is for my EJB server of choice (

[ August 19, 2002: Message edited by: Tim Holloway ]

Customer surveys are for companies who didn't pay proper attention to begin with.
James O'Dell

Joined: Apr 29, 2002
Posts: 16
You are correct, you want to edit /home/sid/.bash_profile
add your new "export PATH=" statement to the end of the file.
The /etc/skel/.bash_profile is a default file that will be put into a new user's home directory. For example, when you added "sid" as a user the system copied /etc/skel/.bash_profile to /home/sid.

I know it can seem difficult to find all of the information you need in order to use a product like the j2sdk on RedHat or any flavor of Linux. However, it's not really Sun's responsibility to give that level of operating system support(except for Solaris of course). A lot of frustration can be avoided by spending some time learning the fundamentals of the OS.
Keep at it, and good luck.
It is sorta covered in the JavaRanch Style Guide.
subject: Having some problem with redhat installation