Link to home
Start Free TrialLog in
Avatar of antioch_75
antioch_75

asked on

Set up a path for Java Compiler in Red Hat Linux 7.2

Hi all,
Recently, I have just install J2sdk1.4.0 into Red Hat Linux 7.2. I am tired of typing the long path name and I have just included the path into .bash_profile file. I dont know is this the correct way but It seems not as the path is not working. So can anyone tell me what's my mistake.

Just in case I have inserted a path into the correct file (.bash_profile), The contents of the file is as below:

#.bash_profile

PATH=$PATH: $HOME/BIN; /usr/java/j2sdk1.4.0/bin

Can anyone explain to me my mistake. and in a layman term because I am new to linux.

Thanks.

Avatar of jlevie
jlevie

Your PATH setting in .bash_profile looks okay, but that file is only read on initial login. So for the PATH to be modified you have to log out and log back in.

Making a similar change in .bashrc will take affect each time a new shell is started and is probably a better place.
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial