简体   繁体   中英

GlassFish5 w/JDK8 under MacOS JDK11 install

Need to run GlassFish5 on MacOS. Current version installed are JDK11.02 and 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)

I have appended the last line in file glassfish5/bin/asenv.bat with AS_JAVA=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home

And I still get a NPE Exception when starting up GlassFish:

>asadmin start-domain
Exception in thread "main" java.lang.NullPointerException

What am I missing?

Or is running GlassFish w/JDK 8 (u144) on MacOS with a JDK11 not possible?

代替在asenv.bat中设置AS_JAVA变量,您需要在glassfish5/config/asenv.conf设置AS_JAVA

AS_JAVA=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM