27
Sep
09

Installing jdk/jre on fedora 11

Download the required version of jdk or jre from the below link,
http://java.sun.com/javase/downloads/index.jsp

Download the bin file,not the rpm,
ex : jdk-6u16-linux-i586.bin

[ SAME PROCEDURE IS FOLLOWED FOR BOTH JDK AND JRE, FOR JRE TO BE INSTALLED USE JRE INSTEAD OF JDK HERE]

After the download is over,move the file to opt,

# mv jdk-6u16-linux-i586.bin /opt

Change the file permission as executable as,[THIS HAS TO BE DONE AS ROOT USER]
# cd /opt
#chmod +x jdk-6u16-linux-i586.bin

Execute the file,

# ./jdk-6u16-linux-i586.bin

After the file gets executed,remove the file,

#rm -rf jdk-6u16-linux-i586.bin

Now open with gedit,

#gedit /etc/profile.d/java.sh

Now paste the following,

export JDK_HOME=/opt/jdk1.6.0_xx
export PATH=$JDK_HOME/bin:$PATH

[replace xx by the version of your jdk]

Now, type the following command to make that file available:

#source /etc/profile.d/java.sh

Then type,

#/usr/sbin/alternatives –install /usr/bin/java java /opt/jdk1.6.0_xx/bin/java 2
#/usr/sbin/alternatives –config java

After entering the above command,it will ask for which java version to be used,press the number of updated version

After that enter,

#java -version

This will provide the java version used.
Now your Fedora is ready for java files to be executed…..

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: