需要在 MacOS 上运行 GlassFish5。当前安装的版本是JDK11.02和JDK1.8.0_144。
>echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home
>which java
/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home/bin/java
>java -version
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
我在文件的最后一行附加glassfish5/bin/asenv.bat
了
AS_JAVA=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
在启动 GlassFish 时,我仍然遇到 NPE 异常:
>asadmin start-domain
Exception in thread "main" java.lang.NullPointerException
我错过了什么?
还是无法在带有 JDK11 的 MacOS 上运行带有 JDK 8 (u144) 的 GlassFish?