问题描述
我正在使用GlassFish在IntelliJ中执行一个项目,并且抛出此错误:
I'm doing a project in IntelliJ with GlassFish and it throws this error:
我在终端中运行了glassfish4/bin/asadmin start-domain
命令,但仍然遇到相同的错误.
I ran the glassfish4/bin/asadmin start-domain
command in a terminal but still get the same error.
我确实安装了Java SE,SDK版本8u152(我在Java Panel上检查过).另外,我也不知道为什么要搜索jdk 9.
I do have Java SE installed, SDK version 8u152 (I checked on Java Panel). Also, I don't know why it searches for jdk 9.
推荐答案
对我来说,打开PATH_TO_YOUR_GLASSFISH/glassfish/config
文件夹中的asenv.conf
,转到行尾并添加set AS_JAVA=/PATH_TO_YOUR_JAVA/Java/JavaVirtualMachines/jdk-YOUR-VERSION.jdk
Which me, open asenv.conf
in PATH_TO_YOUR_GLASSFISH/glassfish/config
folder, go to end of lines and add set AS_JAVA=/PATH_TO_YOUR_JAVA/Java/JavaVirtualMachines/jdk-YOUR-VERSION.jdk
这篇关于GlassFish需要Java SE版本6.您的JDK是版本0(Mac)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!