Monday, February 8, 2016

Setting the default JDK with the /usr/sbin/alternatives Utility

alternatives  creates, removes, maintains and displays information about the symbolic links comprising the alternatives system. The alternatives system is a reim-
       plementation of the Debian alternatives system. It was rewritten primarily to remove the dependence on perl; it is intended  to  be  a  drop  in  replacement  for
       Debian’s update-dependencies script.


  1. Become the root user.
    /usr/sbin/alternatives needs to be run with root privileges. Use the su command or other mechanism to gain these privileges.
  2. Set java.
    Input this command: /usr/sbin/alternatives --config java
    Set javac.
  3. Enter this command: /usr/sbin/alternatives --config javac

No comments:

Post a Comment