Dear All,

I have a SLES 12 SP1 machine on which I need to install Oracle Java Development Kit.

I downloaded form orcale official site a jdk package, jdk-8u102-linux-x64.rpm, but I still have a few issues.

Following the guides on internet i run

rpm -ivh jdk-8u102-linux-x64.rpm

and i get an error

update-alternatives: using /usr/java/jdk1.8.0_102/jre/bin/java to provide /usr/bin/java (java) in auto mode
update-alternatives: error: alternative ControlPanel can't be slave of javac: it is a slave of java
warning: %post(jdk1.8.0_102-2000:1.8.0_102-fcs.x86_64) scriptlet failed, exit status 2

Well now if I run java --version i get a response but I would automate this step into a script and I can't receive an error during Oracle Java Installation.

The last strange thing is that

rpm -e jdk-8u102-linux-x64.rpm

tell me the package is not present

but running again

rpm -ivh jdk-8u102-linux-x64.rpm

tell me that the package is installed.

Does anyone can help me?