< prev index next >

src/jdk.jlink/share/classes/jdk/tools/jlink/internal/packager/AppRuntimeImageBuilder.java

Print this page




 101                         Collections.singletonMap("strip-native-commands", "on"),
 102                         null));
 103         }
 104 
 105         if (excludeFileList != null && !excludeFileList.isEmpty()) {
 106             plugins.add(Jlink.newPlugin(
 107                         "exclude-files",
 108                         Collections.singletonMap("exclude-files", excludeFileList),
 109                         null));
 110         }
 111 
 112         // add user supplied jlink arguments
 113         for (Map.Entry<String, String> entry : userArguments.entrySet()) {
 114             String key = entry.getKey();
 115             String value = entry.getValue();
 116             plugins.add(Jlink.newPlugin(key,
 117                                         Collections.singletonMap(key, value),
 118                                         null));
 119         }
 120 
 121         plugins.add(Jlink.newPlugin("installed-modules", Collections.emptyMap(), null));
 122 
 123         // build the image
 124         Jlink.PluginsConfiguration pluginConfig = new Jlink.PluginsConfiguration(
 125             plugins, new DefaultImageBuilder(outputDir), null);
 126         Jlink jlink = new Jlink();
 127         jlink.build(jlinkConfig, pluginConfig);
 128     }
 129 
 130     /*
 131      * Returns a ModuleFinder that limits observability to the given root
 132      * modules, their transitive dependences, plus a set of other modules.
 133      */
 134     public static ModuleFinder moduleFinder(List<Path> modulepaths,
 135                                             Set<String> roots,
 136                                             Set<String> otherModules) {
 137         return JlinkTask.newModuleFinder(modulepaths, roots, otherModules);
 138     }
 139 }


 101                         Collections.singletonMap("strip-native-commands", "on"),
 102                         null));
 103         }
 104 
 105         if (excludeFileList != null && !excludeFileList.isEmpty()) {
 106             plugins.add(Jlink.newPlugin(
 107                         "exclude-files",
 108                         Collections.singletonMap("exclude-files", excludeFileList),
 109                         null));
 110         }
 111 
 112         // add user supplied jlink arguments
 113         for (Map.Entry<String, String> entry : userArguments.entrySet()) {
 114             String key = entry.getKey();
 115             String value = entry.getValue();
 116             plugins.add(Jlink.newPlugin(key,
 117                                         Collections.singletonMap(key, value),
 118                                         null));
 119         }
 120 


 121         // build the image
 122         Jlink.PluginsConfiguration pluginConfig = new Jlink.PluginsConfiguration(
 123             plugins, new DefaultImageBuilder(outputDir), null);
 124         Jlink jlink = new Jlink();
 125         jlink.build(jlinkConfig, pluginConfig);
 126     }
 127 
 128     /*
 129      * Returns a ModuleFinder that limits observability to the given root
 130      * modules, their transitive dependences, plus a set of other modules.
 131      */
 132     public static ModuleFinder moduleFinder(List<Path> modulepaths,
 133                                             Set<String> roots,
 134                                             Set<String> otherModules) {
 135         return JlinkTask.newModuleFinder(modulepaths, roots, otherModules);
 136     }
 137 }
< prev index next >