< prev index next >
src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java
Print this page
@@ -72,11 +72,10 @@
List<String> arguments; //unnamed arguments
// Java 9 modules support
String addModules = null;
String limitModules = null;
- Boolean stripNativeCommands = null;
String modulePath = null;
String module = null;
String debugPort = null;
File outdir = null;
@@ -166,14 +165,10 @@
void setDebug(String value) {
this.debugPort = value;
}
- void setStripNativeCommands(boolean value) {
- this.stripNativeCommands = value;
- }
-
void setDescription(String description) {
this.description = description;
}
public void setAppId(String id) {
@@ -337,11 +332,11 @@
throw new PackagerException("ERR_MissingArgument", "--output");
}
boolean hasModule = (bundlerArguments.get(
Arguments.CLIOptions.MODULE.getId()) != null);
- boolean hasImage = (bundlerArguments.get(
+ boolean hasAppImage = (bundlerArguments.get(
Arguments.CLIOptions.PREDEFINED_APP_IMAGE.getId()) != null);
boolean hasClass = (bundlerArguments.get(
Arguments.CLIOptions.APPCLASS.getId()) != null);
boolean hasMain = (bundlerArguments.get(
Arguments.CLIOptions.MAIN_JAR.getId()) != null);
@@ -349,14 +344,12 @@
Arguments.CLIOptions.PREDEFINED_RUNTIME_IMAGE.getId()) != null);
boolean hasInput = (bundlerArguments.get(
Arguments.CLIOptions.INPUT.getId()) != null);
boolean hasModulePath = (bundlerArguments.get(
Arguments.CLIOptions.MODULE_PATH.getId()) != null);
- boolean hasAppImage = (bundlerArguments.get(
- Arguments.CLIOptions.PREDEFINED_APP_IMAGE.getId()) != null);
- boolean runtimeInstaller = (bundlerArguments.get(
- Arguments.CLIOptions.RUNTIME_INSTALLER.getId()) != null);
+ boolean runtimeInstaller = (BundlerType.INSTALLER == getBundleType()) &&
+ !hasAppImage && !hasModule && !hasMain && hasRuntimeImage;
if (getBundleType() == BundlerType.IMAGE) {
// Module application requires --runtime-image or --module-path
if (hasModule) {
if (!hasModulePath && !hasRuntimeImage) {
@@ -385,11 +378,11 @@
}
}
// if bundling non-modular image, or installer without app-image
// then we need some resources and a main class
- if (!hasModule && !hasImage && !runtimeInstaller) {
+ if (!hasModule && !hasAppImage && !runtimeInstaller) {
if (resources.isEmpty()) {
throw new PackagerException("ERR_MissingAppResources");
}
if (!hasClass) {
throw new PackagerException("ERR_MissingArgument",
@@ -413,13 +406,13 @@
if (!appImageDir.exists() || appImageDir.list().length == 0) {
throw new PackagerException("ERR_AppImageNotExist", appImage);
}
}
- // Validate build-root
+ // Validate temp-root
String root = (String)bundlerArguments.get(
- Arguments.CLIOptions.BUILD_ROOT.getId());
+ Arguments.CLIOptions.TEMP_ROOT.getId());
if (root != null) {
String [] contents = (new File(root)).list();
if (contents != null && contents.length > 0) {
throw new PackagerException("ERR_BuildRootInvalid", root);
@@ -540,14 +533,10 @@
if (limitModules != null && !limitModules.isEmpty()) {
bundleParams.setLimitModules(limitModules);
}
- if (stripNativeCommands != null) {
- bundleParams.setStripNativeCommands(stripNativeCommands);
- }
-
if (modulePath != null && !modulePath.isEmpty()) {
bundleParams.setModulePath(modulePath);
}
if (module != null && !module.isEmpty()) {
< prev index next >