Thursday, August 8, 2013

Installing Alternatives Configurator (galternatives) on Ubuntu

I have installed Alternatives Configurator(galternatives), a GUI front end for update-alternatives. And I used it to add Oracle JDK to Java alternatives and made it default Java because I installed JDK manually.

1. RESOURCES
Debian Admin: Galternatives – graphical setup tool for Alternatives Configuration in Ubuntu
Ask Ubuntu: How do I make java default to a manually installed JRE/JDK?

2. INSTALLATION
$ sudo apt-get install galternatives

3. LAUNCH TO ADD ORACLE JDK AND MAKE IT DEFAULT
$ gksu galternatives

4. CHECK JAVA VERSION
Before the Java default change using galternative, my Java version was OpenJDK 1.7.
$ java -version
java version "1.7.0_21"
OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-1ubuntu1)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
After the change, my Java version is now Oracle JDK SE 1.7.
$ java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

5. JAVA_HOME SETTING
Be sure to have JAVA_HOME set in .bashrc.
export JAVA_HOME=/usr/lib/jvm/default-java

2 comments:

  1. When I am doing step-3 I have changed the option from 'auto' to 'manual' , but the option is going back to 'auto' immediately

    ReplyDelete
  2. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with extra information? It is extremely helpful for me. seomoz vs ahrefs vs semrush

    ReplyDelete