Payara does not start from Intellij

The Payara with GlassFish 5.192.0 does not start using the Intellij Idea.

If I run payara\bin\asadmin start-domain is works just fine, and the server starts and runs.

These are the final lines from the console output with the --verbose property set on true.

Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED
Command start-domain failed.
The DAS was stopped.

Upvotes: 2

Views: 1123

Answers (1)

CrazyCoder
CrazyCoder

Reputation: 402483

The root case of the issue is logged here.

Windows launcher prepends PATH with JetBrains Runtime bin directory in order to load certain DLLs without issues. It turned out to be not the best solution and we are working to address it in a different way.

asadmin.bat uses the first java.exe from PATH. It doesn't try to detect it via JAVA_HOME.

The workaround for now is to switch IntelliJ IDEA boot JDK to JBR8 per this document or start IntelliJ IDEA using idea.bat instead of idea64.exe.

The issue is fixed in 2019.2.1 RC.

Upvotes: 3

Related Questions