mbien commented on code in PR #8059:
URL: https://github.com/apache/netbeans/pull/8059#discussion_r1887167886
##########
platform/core.startup/src/org/netbeans/core/startup/TopLogging.java:
##########
@@ -309,6 +313,32 @@ private static String createBootClassPath() {
return sb.toString();
}
+ private List<String> createJavaBootModuleList() {
+ // TODO JDK 11 equivalent
+// return ModuleLayer.boot().modules().stream()
+// .map(Module::getName)
+// .sorted()
+// .collect(Collectors.toList());
+ try {
+ Class<?> mod_class = Class.forName("java.lang.Module");
+ Class<?> ml_class = Class.forName("java.lang.ModuleLayer");
+ @SuppressWarnings("unchecked")
+ Set<?> mods = (Set<?>)ml_class.getDeclaredMethod("modules").invoke(
+ ml_class.getDeclaredMethod("boot").invoke(null)
+ );
+ return mods.stream().map(mod -> {
+ try {
+ return (String) mod_class.getMethod("getName").invoke(mod);
Review Comment:
oh you are right! will update
--
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