Ask Your Question
0

Jdk 1.6.37 installation and setup problem

asked 2012-12-05 00:01:04 -0600

Aravindhan gravatar image

I have installed jdk 1.6.37 in fedora 17 which already has java 1.7 openjdk i want to set java 1.6 as my default java how can i do this

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-12-05 21:51:27 -0600

agajan gravatar image

If you have downloaded the JDK installer from Oracle, the java executable may not be configurable with the alternatives command.

If the java executable is located in /usr/java/jdk1.6.0_37/bin, then you can create a file named /etc/profile.d/java.sh with the following contents:

PATH=/usr/java/jdk1.6.0_37/bin:$PATH

You will have to have to create this file with the root user. You can do this with the following command:

su -c 'gedit /etc/profile.d/java.sh'

You can make this new configuration file take effect by logging out and then logging back in.

edit flag offensive delete link more
0

answered 2012-12-05 02:02:33 -0600

davidva gravatar image

updated 2012-12-05 02:04:03 -0600

Hi, try it:

From a terminal

su -c 'update-alternatives --config java'
edit flag offensive delete link more

Comments

It worked for me, thank you. I don't have enough karma to vote, that's why I'm writing (:

ale gravatar imageale ( 2013-05-21 10:47:49 -0600 )edit

Question Tools

Stats

Asked: 2012-12-05 00:01:04 -0600

Seen: 331 times

Last updated: Dec 05 '12