简体   繁体   English

“GlassFish 需要 Java SE 版本 6。您的 JDK 是版本 0”

[英]"GlassFish requires Java SE version 6. Your JDK is version 0"

I'm trying to use Glassfish on a Mac running 10.15.6 Catalina.我正在尝试在运行 10.15.6 Catalina 的 Mac 上使用 Glassfish。 When I run the command,当我运行命令时,

./asadmin start-domain 

I get the message,我收到消息,

"GlassFish requires Java SE version 6.  Your JDK is version 0"

Numerous posts online said to add to the file "asenv.conf," a path to the JDK, such as网上很多帖子说要在文件“asenv.conf”中添加JDK的路径,比如

AS_JAVA="/Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home"

Unfortunately, after adding that line (or paths to several other Java location) I'm still getting the error.不幸的是,在添加该行(或其他几个 Java 位置的路径)后,我仍然遇到错误。 I know it's reading the file, because when I've made a typo on that line is says there is no version of Java at the location.我知道它正在读取文件,因为当我在该行打错字时,它说该位置没有 Java 的版本。

Any suggestions?有什么建议么?

Make sure you are running the right version of Java ie Java 8. GlassFish 4 and 5 cannot run on JDK 9 or later.确保您运行的是 Java 的正确版本,即 Java 8. GlassFish 4 和 5 无法在 JDK 9 或更高版本上运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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