< prev index next >

src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptLoader.java

Print this page

        

@@ -72,11 +72,12 @@
         final ModuleDescriptor.Builder builder =
             ModuleDescriptor.newModule(moduleName, Set.of(Modifier.SYNTHETIC))
                     .requires("java.logging")
                     .requires(NASHORN_MODULE.getName())
                     .requires(structMod.getName())
-                    .packages(Set.of(SCRIPTS_PKG));
+                    .packages(Set.of(SCRIPTS_PKG))
+                    .exports(SCRIPTS_PKG, Set.of(NASHORN_MODULE.getName()));
 
         if (Context.javaSqlFound) {
             builder.requires("java.sql");
         }
 
< prev index next >