我正在尝试在 ubuntu 上安装 java 9 jre 和 jdk。但我找不到它。我安装了所有软件包:
ii openjdk-9-jdk:amd64 9~b181-4 amd64 OpenJDK Development Kit (JDK)
ii openjdk-9-jdk-headless:amd64 9~b181-4 amd64 OpenJDK Development Kit (JDK) (headless)
ii openjdk-9-jre:amd64 9~b181-4 amd64 OpenJDK Java runtime, using Hotspot JIT
ii openjdk-9-jre-headless:amd64 9~b181-4 amd64 OpenJDK Java runtime, using Hotspot JIT (headless)
Java 版本返回:
openjdk version "9-Ubuntu"
OpenJDK Runtime Environment (build 9-Ubuntu+0-9b181-4)
OpenJDK 64-Bit Server VM (build 9-Ubuntu+0-9b181-4, mixed mode)
javac-版本:
javac 9-Ubuntu
然后我得到错误:
我检查了 /usr/lib/jvm/ 的内容,并且:
对于 java-8-openjdk-amd64:
drwxr-xr-x 7 root root 4096 gru 17 16:16 ./
drwxr-xr-x 4 root root 4096 gru 18 18:11 ../
lrwxrwxrwx 1 root root 22 paź 24 00:43 ASSEMBLY_EXCEPTION -> jre/ASSEMBLY_EXCEPTION
drwxr-xr-x 2 root root 4096 gru 17 16:16 bin/
lrwxrwxrwx 1 root root 41 paź 24 00:43 docs -> ../../../share/doc/openjdk-8-jre-headless/
drwxr-xr-x 3 root root 4096 gru 17 16:16 include/
drwxr-xr-x 5 root root 4096 gru 17 16:16 jre/
drwxr-xr-x 3 root root 4096 gru 17 16:16 lib/
drwxr-xr-x 4 root root 4096 gru 17 16:16 man/
lrwxrwxrwx 1 root root 20 paź 24 00:43 src.zip -> ../openjdk-8/src.zip
lrwxrwxrwx 1 root root 22 paź 24 00:43 THIRD_PARTY_README -> jre/THIRD_PARTY_README
对于 java-9-openjdk-amd64:
drwxr-xr-x 9 root root 4096 gru 18 18:11 ./
drwxr-xr-x 4 root root 4096 gru 18 18:11 ../
drwxr-xr-x 2 root root 4096 gru 18 18:11 bin/
drwxr-xr-x 4 root root 4096 gru 18 18:11 conf/
lrwxrwxrwx 1 root root 41 sie 24 19:15 docs -> ../../../share/doc/openjdk-9-jre-headless/
drwxr-xr-x 3 root root 4096 gru 18 18:11 include/
drwxr-xr-x 2 root root 4096 gru 18 18:11 jmods/
drwxr-xr-x 77 root root 4096 gru 18 18:11 legal/
drwxr-xr-x 5 root root 4096 gru 18 18:11 lib/
drwxr-xr-x 4 root root 4096 gru 18 18:11 man/
lrwxrwxrwx 1 root root 20 sie 24 19:15 src.zip -> ../openjdk-9/src.zip
我的问题是出了什么问题?要安装 java-9,我使用了:
sudo apt install openjdk-9-jre openjdk-9-jdk