- Download the SDK from here
- Install the SDK. For example: sudo rpm -Uvih <sdk rpmfile> or sudo sh ./<sdk bin file>
- Once it is installed, copy-paste the following script and execute it
#!/bin/sh
for FP in /usr/java/default/bin/* ; do
NAME=${FP##*/}
echo installing $NAME
sudo alternatives --install /usr/bin/${NAME} ${NAME} /usr/java/default/bin/${NAME} 20000
alternatives --display "${NAME}" | grep "${NAME}"
done
UPDATE-ALTERNATIVES(8) UPDATE-ALTERNATIVES(8)
ReplyDeleteNAME
alternatives - maintain symbolic links determining default commands
SYNOPSIS
alternatives [options] --install link name path priority [--slave link
name path]... [--initscript service]
alternatives [options] --remove name path
alternatives [options] --set name path
alternatives [options] --auto name
alternatives [options] --display name
alternatives [options] --config name
DESCRIPTION
alternatives creates, removes, maintains and displays information about
the symbolic links comprising the alternatives system.