src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java
branchJDK-8200758-branch
changeset 57450 82c78b40b39d
parent 57438 4a31db8d42bd
child 57741 38856ef4a19c
equal deleted inserted replaced
57448:ac7b7fe5f7d8 57450:82c78b40b39d
   459             // display error for arguments that are not supported
   459             // display error for arguments that are not supported
   460             // for current configuration.
   460             // for current configuration.
   461 
   461 
   462             validateArguments();
   462             validateArguments();
   463 
   463 
   464             addResources(deployParams, input);
   464             addResources(deployParams, input, mainJarPath);
   465 
   465 
   466             List<Map<String, ? super Object>> launchersAsMap =
   466             List<Map<String, ? super Object>> launchersAsMap =
   467                     new ArrayList<>();
   467                     new ArrayList<>();
   468 
   468 
   469             for (AddLauncherArguments sl : addLaunchers) {
   469             for (AddLauncherArguments sl : addLaunchers) {
   645             }
   645             }
   646         }
   646         }
   647     }
   647     }
   648 
   648 
   649     private void addResources(DeployParams deployParams,
   649     private void addResources(DeployParams deployParams,
   650             String inputdir) throws PackagerException {
   650             String inputdir, String mainJar) throws PackagerException {
   651 
   651 
   652         if (inputdir == null || inputdir.isEmpty()) {
   652         if (inputdir == null || inputdir.isEmpty()) {
   653             return;
   653             return;
   654         }
   654         }
   655 
   655 
   670         } catch (IOException e) {
   670         } catch (IOException e) {
   671             Log.error("Unable to add resources: " + e.getMessage());
   671             Log.error("Unable to add resources: " + e.getMessage());
   672         }
   672         }
   673         fileNames.forEach(file -> deployParams.addResource(baseDir, file));
   673         fileNames.forEach(file -> deployParams.addResource(baseDir, file));
   674 
   674 
   675         deployParams.setClasspath();
   675         deployParams.setClasspath(mainJar);
   676     }
   676     }
   677 
   677 
   678     static CLIOptions toCLIOption(String arg) {
   678     static CLIOptions toCLIOption(String arg) {
   679         CLIOptions option;
   679         CLIOptions option;
   680         if ((option = argIds.get(arg)) == null) {
   680         if ((option = argIds.get(arg)) == null) {