After you’ve downloaded and installed the latest JDK form the Sun servers, you need to set up the class paths so that you can run java and javac from the terminal (Sun’s JAVA instead GNU GCJ). Here is the steps to set the classpaths
- Move the extracted files to /usr/java (if not exist, create a new directory)
- open a terminal and type vim .bashrc
- Insert the following lines
export PATH=/usr/java/jdk1.6.0_03/bin:$PATH
export JAVA_HOME=”/usr/java/jdk1.6.0_03″
export CLASSPATH=.:/usr/java/jdk1.6.0_03
Save & Exit, then Reboot the system. That’s all
Note: Set your path accordingly. ie if your JDK is 1.5 then the path will be like /usr/java/jdk1.5
1 Comment
April 23, 2008 at 5:19 pm
Thanx da machaaa.
Its working……..