Thread: Installing Java
View Single Post
  #13 (permalink)  
Old July 12th, 2003
nDiScReEt's Avatar
nDiScReEt nDiScReEt is offline
_eLeCtRiFyInG MeMbRr_
 
Join Date: May 9th, 2002
Location: Chicago
Posts: 232
nDiScReEt is flying high
Default Here Is The 411

Quote:
Originally posted by GertDeSmet
I have followed the procedure and i still cant run Java. When i do java -version it says java command not found. here is my profile :

PATH=/usr/java/j2re-1.4.0_03/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/julien/bin
JAVA_HOME=/usr/java/j2re-1.4.0_03
PATH=/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/julien/bin
export JAVA_HOME

thnx a lot in advance 4 ur help

gert
First, $JAVA_HOME should be written before your $PATH statement.
Second, Your path statement with your $JAVA_HOME path statement should be written as follows:

PATH=$JAVA_HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/julien/bin

So your profile should look like this:

JAVA_HOME=/usr/java/j2re-1.4.0_03
PATH=$JAVA_HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/julien/bin


Next you would need to type:

source /etc/profile

or

. /etc/profile #make sure there is a space between the period (.) and slash (/).

or

source ~/.bash_profile

or

. ~/.bash_profile #Make sure there is a space between the period (.) and tilde (~).

or simply logout and then back in to your system to initialize your system to use the new changes to your shell environment.

The dot/period (.) is the same as the "source" command on most systems that don't recognize the "source" command.

HTH

altoine
Reply With Quote