matthiasblaesing commented on a change in pull request #3056:
URL: https://github.com/apache/netbeans/pull/3056#discussion_r680371939
##########
File path:
enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/GlassFishV6_1_0.xml
##########
@@ -23,9 +23,10 @@
<tools lib="lib">
<asadmin jar="client/appserver-cli.jar"/>
</tools>
- <java version="1.8">
- <platform version="1.7"/>
- <platform version="1.8"/>
+ <java version="11">
+ <platform version="1.8"/>
Review comment:
For me running glassfish on 6.1 on 8 failed. Are you sure 8 is still
supported?
##########
File path:
enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/StartTask.java
##########
@@ -757,6 +761,20 @@ private void appendStartupExtenderParams(List<String>
optList) {
}
}
+ /**
+ * Appends options in order to open modules for java 9.0+
+ * @param optList
+ */
+ private void appendModuleOpensParams(List<String> optList) {
+ SpecificationVersion currentInstanceJavaVersion =
JavaUtils.serverInstancePlatform(instance).getSpecification().getVersion();
+ SpecificationVersion firstJavaVersionWithModules = new
SpecificationVersion("9");
+
+
if(currentInstanceJavaVersion.compareTo(firstJavaVersionWithModules)>=0){
+ optList.add("--add-opens java.base/java.lang=ALL-UNNAMED");
+ optList.add("--add-opens
java.naming/javax.naming.spi=ALL-UNNAMED");
Review comment:
Why is this necessary? I downloaded Glassfish 6.1 from github and was
able to start it standalone with JDK 11. This lead me to have a look at the
domain.xml and I found this:
```xml
<jvm-options>--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED</jvm-options>
<jvm-options>--add-opens=java.base/sun.net.www.protocol.jrt=ALL-UNNAMED</jvm-options>
<jvm-options>--add-opens=java.base/java.lang=ALL-UNNAMED</jvm-options>
<jvm-options>--add-opens=java.base/java.util=ALL-UNNAMED</jvm-options>
<jvm-options>--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED</jvm-options>
```
The jvm-options are picked up by:
https://github.com/apache/netbeans/blob/master/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/ServerTasks.java#L162
and
https://github.com/apache/netbeans/blob/master/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/parser/JvmConfigReader.java#L187-L189
https://github.com/apache/netbeans/blob/master/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/parser/JvmConfigReader.java#L134-L139
As the server start standalone, I don't see why netbeans needs the addtional
opens. Can you shed some light on this?
--
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