Linux Mageia Howto Switch/Change between Multiples Java Versions

September 4th, 2012 by Regaz



This Article Shows You How-to Switch/Change between Multiples Java Versions on Mageia Linux Desktop.

The Process Make Use of the update-alternatives Package Java Versions Manager.

The Content give Focus Only to the Essentials Instructions and Commands to make it Easier to Understand;)

Java On Mageia
  1. Open a Terminal Window Mageia Linux 2 KDE Open Terminal
  2. Login as SuperUser
    su 

    If Got “User is Not in Sudoers file” then Look: Solution

  3. Switch of Java Release
    • Switching to Classical Open-Java Versions Installed by the Mageia Packages

      Example:

      update-alternatives --install \
      /usr/bin/java java /usr/lib/jvm/jdk1.7*/bin/java 1065
      update-alternatives --install \
      /usr/bin/javac javac /usr/lib/jvm/jdk1.7*/bin/javac 1065
      update-alternatives --install \
      /usr/bin/jar jar /usr/lib/jvm/jdk1.7*/bin/jar 1065
      update-alternatives --install \
      /usr/bin/javaws javaws /usr/lib/jvm/jdk1.7*/bin/javaws 1065

      By Default the Open-Java JDK Packages are Automatically Installed Under: /usr/lib/jvm

    • Switching to Oracle Java Official Release Versions

      How-to Install Oracle Java JDK on Mageia Linux:

      Installing Oracle-JDK7 on Mageia

      Example:

      update-alternatives --install \
      /usr/bin/java java /usr/java/jdk1.7*/bin/java 1065
      update-alternatives --install \
      /usr/bin/javac javac /usr/java/jdk1.7*/javac
      update-alternatives --install \
      /usr/bin/jar jar /usr/java/jdk1.7*/bin/jar 1065
      update-alternatives --install \
      /usr/bin/javaws javaws /usr/java/jdk1.7*/javaws

      By Default the .rpm Oracle Java JDK Packages are Automatically Installed Under: /usr/java

Mageia Linux How-to Getting-Started Installing New Packages/Software

Getting-Started Installing Stuff on Mageia
(Visited 2 times, 1 visits today)
Share on Tumblr

Tags: , , , , , , ,