I've jdk1.8.0_171
installed on my windows 10, 64bit OS , yesterday I've downloaded Payara Micro Community 5.2020.4
and added the server on Netbeans 8.2
, but when I try to start the sever NetBeans Payara server log shows following error
Error: Could not find or load main class [9|]--add-opens=java.logging.java.util.logging=ALL-UNNAMED
Need clues to resolve this error
Thanks in advance
This is due to a change in Payara Server configuration that's not compatible with how the older version of the Netbeans Payara (GlassFish) plugin launches Payara Server. The plugin uses a hacky mechanism that reads the domain configuration and launches the Java process of Payara Server directly instead of using the asadmin launcher.
You can easily fix this by editing the
domain.xml
file inglassfish/domains/domain1/config/domain.xml
. Just remove all jvm-option elements where you find[
and]
brackets. These define the Java version for which the JVM option is applicable. Usually this is for running on JDK 9+, so it's safe to remove those options if you run on Java 8.So, remove this option and all similar options:
Upgrading Netbeans to the latest version 12.1 also fixes this problem as Netbeans has been updated to understand this change in the configuration.