Install Java alternatives

Error:

update-alternatives: error: alternative javaws can't be master: it is a slave of javaplugin

or

update-alternatives: error: alternative jar can't be master: it is a slave of javac

Solution:

update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk1.8.0_51/bin/java" 1

update-alternatives --install "/usr/lib64/browser-plugins/javaplugin.so" "javaplugin" "/usr/java/jdk1.8.0_51/jre/lib/amd64/libnpjp2.so" 1 --slave "/usr/bin/javaws" "javaws" "/usr/java/jdk1.8.0_51/bin/javaws"

update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk1.8.0_51/bin/javac" 1 --slave "/usr/bin/jar" "jar" "/usr/java/jdk1.8.0_51/bin/jar"

Note:

1 – is the priority

Please change the paths as required on your operation system

Change java alternatives:


update-alternatives --config java

update-alternatives --config javac

update-alternatives --config javaplugin

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s