TUTORIAL: Install Eclipse in FC1
Now the Java SDK is installed to /usr/java which is not in your path. Create a file called java.sh in /etc/profile.d/ with the following contents:
export JAVA_HOME="/usr/java/j2sdk1.4.2_03"
export JAVA_PATH="$JAVA_HOME"
export JDK_PATH="$JAVA_HOME"
export PATH="$PATH:$JAVA_HOME/bin"
Remember that the java directory can change according with the Java2SDK version you installed. Make the script executable:
$ sudo chmod +x /etc/profile.d/java.sh
You need to logout and login back to the changes to make effect or run:
$ source /etc/profile.d/java.sh
Make sure that you have access to java commands such as
java and
javac:
$ javac
Usage: javac