Default Java environment is already set to 'java-8-openjdk' See 'archlinux-java help' to change it. When you use a non-reparenting window manager, set _JAVA_AWT_WM_NONREPARENTING=1 in /etc/profile.d/jre.sh jre 的可选依赖 alsa-lib: for basic sound support [已安装] (3/3) 正在安装 jdk [################################] 100% Default Java environment is already set to 'java-8-openjdk' See 'archlinux-java help' to change it
切换 JDK 版本
使用archlinux-java命令切换JDK 版本
archlinux-java help
1 2 3 4 5 6 7 8
archlinux-java <COMMAND>
COMMAND: status List installed Java environments and enabled one get Return the short name of the Java environment set as default set <JAVA_ENV> Force <JAVA_ENV> as default unset Unset current default Java environment fix Fix an invalid/broken default Java environment configuration
set 就是设置默认环境的方法
set 之前
1 2 3 4
java -version openjdk version "1.8.0_212" OpenJDK Runtime Environment (build 1.8.0_212-b03) OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode)
执行sudo archlinux-java set java-12-jdk
set 之后
1 2 3 4
java -version java version "12.0.1" 2019-04-16 Java(TM) SE Runtime Environment (build 12.0.1+12) Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)