I have tried to install the Oracle Java JDK 9 using the rpm and I get errors.
I was following the guidance on the OpenSUSE web page “SDB:Installing Java” so I downloaded the latest version of Jave from the Oracle website and then used rpm to try an install:
:~/Downloads> sudo rpm -ivh jdk-9_linux-x64_bin.rpm
[sudo] password for root:
Preparing... ################################# [100%]
Updating / installing...
1:jdk-9-2000:9-ga ################################# [100%]
Unpacking JAR files...
plugin.jar...
javaws.jar...
deploy.jar...
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/16x16/apps/sun-java.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/16x16/apps/sun-javaws.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/48x48/apps/sun-java.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/48x48/apps/sun-javaws.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/48x48/apps/sun-java.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/48x48/apps/sun-javaws.png': No such file or directory
update-alternatives: error: alternative javaws can't be slave of java: it is a slave of javaplugin
update-alternatives: error: alternative javaws can't be slave of javac: it is a slave of javaplugin
warning: %post(jdk-9-2000:9-ga.x86_64) scriptlet failed, exit status 2
I then downloaded the tar.gz file and have compared the contents with the /usr/java folder and can confirm that all the files are there in name anyway. I will just have to trust that the file contents are the same for now!
Is there any obvious way for me to check how far the install has progressed?
Has the browser plugin been put in place correctly?
Have any “alternatives” been put in place before the update-alternatives ran into problems?
The output errors will be as you describe, but those are minor bugs… There is only one generic image file for all instead of the individually named image files the install is looking for. I doubt that the image files should make any diff but if it bothers you, you can go rename them to what the installer expected.
As for the update-alternatives error, that also is likely minor and should be fixed up by someone, but won’t affect actually using the SDK.
View your existing java version with
java -version
And switch between different installed Oracle and openjdk Java with
update-alternatives --config java
Works fine for me, although as I describe I did not verify all features work (they should). Note that there are additional instructions for installing the web browser plugin at
There is not option to change to the Java 9 install:
:~> sudo update-alternatives --config java
[sudo] password for root:
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java
Nothing to configure.
I am still on the openjava version:
:~> java -version
openjdk version "1.8.0_144"
OpenJDK Runtime Environment (IcedTea 3.5.1) (suse-15.2-x86_64)
OpenJDK 64-Bit Server VM (build 25.144-b01, mixed mode)
I hope that there is some way round this. Maybe I will just have to create my own scripts.
There is no man folder in the JDK-9 distribution so no manual pages.
:~/Downloads> sudo rpm -Uvh jdk-9_linux-x64_bin.rpm
Preparing... ################################# [100%]
Updating / installing...
1:jdk-9-2000:9-ga ################################# [100%]
Unpacking JAR files...
plugin.jar...
javaws.jar...
deploy.jar...
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/16x16/apps/sun-java.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/16x16/apps/sun-javaws.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/48x48/apps/sun-java.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/48x48/apps/sun-javaws.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/48x48/apps/sun-java.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/48x48/apps/sun-javaws.png': No such file or directory
update-alternatives: error: alternative javaws can't be slave of java: it is a slave of javaplugin
update-alternatives: error: alternative javaws can't be slave of javac: it is a slave of javaplugin
warning: %post(jdk-9-2000:9-ga.x86_64) scriptlet failed, exit status 2
It is loaded:
:~/Downloads> rpm -qi --whatprovides java
Name : java-1_8_0-openjdk
Version : 1.8.0.144
Release : 15.2
Architecture: x86_64
Install Date: Mon 02 Oct 2017 18:51:12 BST
Group : Development/Languages/Java
Size : 579237
License : Apache-1.1 and Apache-2.0 and GPL-1.0+ and GPL-2.0 and GPL-2.0-with-classpath-exception and LGPL-2.0 and MPL-1.0 and MPL-1.1 and SUSE-Public-Domain and W3C
Signature : RSA/SHA256, Fri 29 Sep 2017 22:17:40 BST, Key ID b88b2fd43dbdc284
Source RPM : java-1_8_0-openjdk-1.8.0.144-15.2.src.rpm
Build Date : Fri 29 Sep 2017 22:12:05 BST
Build Host : build84
Relocations : (not relocatable)
Packager : http://bugs.opensuse.org
Vendor : openSUSE
URL : http://openjdk.java.net/
Summary : OpenJDK 8 Runtime Environment
Description :
The OpenJDK 8 runtime environment.
Distribution: openSUSE Leap 42.3
Name : jdk-9
Epoch : 2000
Version : 9
Release : ga
Architecture: x86_64
Install Date: Sat 07 Oct 2017 16:59:49 BST
Group : Development/Tools
Size : 565996940
License : http://java.com/license
Signature : (none)
Source RPM : jdk-9-9-ga.src.rpm
Build Date : Thu 03 Aug 2017 05:14:13 BST
Build Host : sca00kmc.us.oracle.com
Relocations : /usr/java
Packager : Java Software <jre-comments@java.sun.com>
Vendor : Oracle Corporation
URL : URL_REF
Summary : Java Platform Standard Edition Development Kit
Description :
The Java Platform Standard Edition Development Kit (JDK) includes both
the runtime environment (Java virtual machine, the Java platform classes
and supporting files) and development tools (compilers, debuggers,
tool libraries and other tools).
The JDK is a development environment for building applications, applets
and components that can be deployed with the Java Platform Standard
Edition Runtime Environment.
Distribution: (none)
But not selected by alternatives:
:~/Downloads> java -version
openjdk version "1.8.0_144"
OpenJDK Runtime Environment (IcedTea 3.5.1) (suse-15.2-x86_64)
OpenJDK 64-Bit Server VM (build 25.144-b01, mixed mode)
Not even available in alternatives:
:~/Downloads> sudo update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java
Nothing to configure.
So still at the same place. Looks like I will have to make the alternatives scripts myself.
I may be able to find some time to tinker a bit with my install to see if I can guess what might have happened to yours.
In the meantime,
You might be able to develop some insights by inspecting the contents of of the rpm… I don’t have it in front of me at the moment but typically you should see the files that are installed and the actual update-alternatives that is installed.
If I were to guess,
There’s nothing wrong with the update alternatives, but your Java 9 files are probably in the wrong location.
I doubt it should make a difference, but you should try installing using “su” and not “sudo” if you want to follow <exactly> what I did.
**linux-g8mj:~ #** zypper in jdk-9.0.1_linux-x64_bin.rpm
Baixando os metadados do repositório 'openSUSE-Leap-42.3-Update-Non-Oss' ....................................................................................................[concluído]
Construindo o cache do repositório 'openSUSE-Leap-42.3-Update-Non-Oss' ......................................................................................................[concluído]
Carregando dados do repositório...
Lendo os pacotes instalados...
Resolvendo dependências de pacote...
O seguinte pacote NOVO será instalado:
jdk-9.0.1
1 novo pacote a ser instalado.
Tamanho total do download: 305,0 MiB. Já em cache: 0 B. Após a operação, 551,5 MiB adicionais serão utilizados.
**Continuar? [s/n/...? exibe todas as opções] (s): **
Baixando pacote jdk-9.0.1-2000:9.0.1-ga.x86_64 (1/1), 305,0 MiB (551,5 MiB descompactado)
jdk-9.0.1_linux-x64_bin.rpm:
O pacote não está assinado!
jdk-9.0.1-2000:9.0.1-ga.x86_64 (Cache de arquivos RPM simples): Falha na verificação da assinatura [6-O arquivo não está assinado]
**Cancelar, repetir ou ignorar? [c/r/i] (c): **i
Verificando por conflito de arquivos: .......................................................................................................................................[concluído]
(1/1) Instalando: jdk-9.0.1-2000:9.0.1-ga.x86_64 ............................................................................................................................[concluído]
**linux-g8mj:~ #** java -version
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)