< prev index next >

src/jdk.jpackage/share/classes/jdk/jpackage/internal/JLinkBundlerHelper.java

Print this page




 133         ModuleHelper moduleHelper = new ModuleHelper(
 134                 modulePath, addModules, limitModules);
 135         return removeInvalidModules(modulePath, moduleHelper.modules());
 136     }
 137 
 138     static void execute(Map<String, ? super Object> params,
 139             AbstractAppImageBuilder imageBuilder)
 140             throws IOException, Exception {
 141 
 142         // we might be able to build it (with no main class) but it won't run
 143         if (StandardBundlerParam.MAIN_CLASS.fetchFrom(params) == null) {
 144             throw new PackagerException("ERR_NoMainClass");
 145         }
 146 
 147         List<Path> modulePath =
 148                 StandardBundlerParam.MODULE_PATH.fetchFrom(params);
 149         Set<String> addModules =
 150                 StandardBundlerParam.ADD_MODULES.fetchFrom(params);
 151         Set<String> limitModules =
 152                 StandardBundlerParam.LIMIT_MODULES.fetchFrom(params);
 153         Path outputDir = imageBuilder.getRoot();
 154         File mainJar = getMainJar(params);
 155         ModFile.ModType mainJarType = ModFile.ModType.Unknown;
 156 
 157         if (mainJar != null) {
 158             mainJarType = new ModFile(mainJar).getModType();
 159         } else if (StandardBundlerParam.MODULE.fetchFrom(params) == null) {
 160             // user specified only main class, all jars will be on the classpath
 161             mainJarType = ModFile.ModType.UnnamedJar;
 162         }
 163 
 164         boolean bindServices = addModules.isEmpty();
 165 
 166         // Modules
 167         String mainModule = getMainModule(params);
 168         if (mainModule == null) {
 169             if (mainJarType == ModFile.ModType.UnnamedJar) {
 170                 if (addModules.isEmpty()) {
 171                     // The default for an unnamed jar is ALL_DEFAULT
 172                     addModules.add(ModuleHelper.ALL_DEFAULT);
 173                 }




 133         ModuleHelper moduleHelper = new ModuleHelper(
 134                 modulePath, addModules, limitModules);
 135         return removeInvalidModules(modulePath, moduleHelper.modules());
 136     }
 137 
 138     static void execute(Map<String, ? super Object> params,
 139             AbstractAppImageBuilder imageBuilder)
 140             throws IOException, Exception {
 141 
 142         // we might be able to build it (with no main class) but it won't run
 143         if (StandardBundlerParam.MAIN_CLASS.fetchFrom(params) == null) {
 144             throw new PackagerException("ERR_NoMainClass");
 145         }
 146 
 147         List<Path> modulePath =
 148                 StandardBundlerParam.MODULE_PATH.fetchFrom(params);
 149         Set<String> addModules =
 150                 StandardBundlerParam.ADD_MODULES.fetchFrom(params);
 151         Set<String> limitModules =
 152                 StandardBundlerParam.LIMIT_MODULES.fetchFrom(params);
 153         Path outputDir = imageBuilder.getRuntimeRoot();
 154         File mainJar = getMainJar(params);
 155         ModFile.ModType mainJarType = ModFile.ModType.Unknown;
 156 
 157         if (mainJar != null) {
 158             mainJarType = new ModFile(mainJar).getModType();
 159         } else if (StandardBundlerParam.MODULE.fetchFrom(params) == null) {
 160             // user specified only main class, all jars will be on the classpath
 161             mainJarType = ModFile.ModType.UnnamedJar;
 162         }
 163 
 164         boolean bindServices = addModules.isEmpty();
 165 
 166         // Modules
 167         String mainModule = getMainModule(params);
 168         if (mainModule == null) {
 169             if (mainJarType == ModFile.ModType.UnnamedJar) {
 170                 if (addModules.isEmpty()) {
 171                     // The default for an unnamed jar is ALL_DEFAULT
 172                     addModules.add(ModuleHelper.ALL_DEFAULT);
 173                 }


< prev index next >