renatsaf commented on issue #6270:
URL: https://github.com/apache/netbeans/issues/6270#issuecomment-4723987928

   Root cause and a fix in #9446.
   
   The `-Djava.endorsed.dirs=…` argument is not generated by the project's 
`build-impl.xml` (its own `endorsed.classpath.cmd.line.arg` correctly uses 
`-Xbootclasspath/p:` and is empty here). It comes from the GlassFish plugin: 
`Hk2JavaEEPlatformImpl.getToolProperty(TOOL_APP_CLIENT_RUNTIME, 
TOOL_PROP_JVM_OPTS)` unconditionally prepends 
`-Djava.endorsed.dirs=<root>/lib/endorsed:<root>/modules/endorsed` to the 
app-client container JVM options. That flows into the generated build script as 
`j2ee.appclient.tool.jvmoptions` and is passed as a `<jvmarg>` to the 
`run-appclient` macro.
   
   The endorsed-standards mechanism was removed in JDK 9 (JEP 220), and HotSpot 
deliberately aborts at startup when `java.endorsed.dirs` is set — which is why 
the client JVM never starts. GlassFish 7 requires JDK 11+ and ships no 
`endorsed` directories, so the option is both invalid and points at 
non-existent paths (matching your observation that the directory doesn't exist).
   
   #9446 builds the option only from the `lib/endorsed` / `modules/endorsed` 
directories that actually exist and omits it entirely when neither is present, 
so app clients run on JDK 9+ while legacy JDK 8 servers that still ship those 
dirs are unaffected.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to