Friday, December 12, 2008

Install JAVA in Fedora 9/Linux

1.sh jdk-1_5_0_13-dlj-linux-i586.bin --unpack

to create .rpm

2.rpm -i jdk-1_5_0_11-linux-i586.rpm

In.rpm file

3. Set the environment variables:

echo 'export JAVA_HOME=/opt/jdk1.5.0_13' > /etc/profile.d/jdk.sh
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> /etc/profile.d/jdk.sh

4. Source the file you just created:

source /etc/profile.d/jdk.sh

5. You can verify that the Java environment has been installed successfully installed by executing this command from the shell:

java -version