help: path variables...huh?

Craig Thomas cjtinhp at optonline.net
Sun Jun 20 01:30:20 UTC 2004


javac javac wrote:
> to use the java compiler i have to enter the full path, along the lines of:
> 
> /home/net/j2../javac foo.java
> 
> which seems a bit much.  

You need to set your $PATH environment variable to include your sdk [or 
jre].

You can do this a number of places, anything that gets run as you login, 
such as your .profile file [in your home dir], /etc/profile or create a 
file in /etc/profile.d called java.sh with [something like] the following:

	export JAVA_HOME="/usr/java/j2re1.4.2_02"
	export PATH="$PATH:$JAVA_HOME/bin"

The last option [/etc/profile.d/java.sh] has the benefit of working for 
every user, not just yourself.


> javac at mail dot com

HTH,

-- 
Craig Thomas [cjtinhp at optonline.net]





More information about the fedora-list mailing list