< prev index next >
src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java
Print this page
@@ -50,11 +50,11 @@
*/
public class DeployParams {
final List<RelativeFileSet> resources = new ArrayList<>();
- String targetFormat = null; // means app-image
+ String targetFormat = null; // means default type for this platform
File outdir = null;
// raw arguments to the bundler
Map<String, ? super Object> bundlerArguments = new LinkedHashMap<>();
@@ -195,14 +195,14 @@
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 runtimeInstaller = targetFormat != null &&
+ boolean runtimeInstaller = !isTargetAppImage() &&
!hasAppImage && !hasModule && !hasMain && hasRuntimeImage;
- if (targetFormat == null) {
+ if (isTargetAppImage()) {
// Module application requires --runtime-image or --module-path
if (hasModule) {
if (!hasModulePath && !hasRuntimeImage) {
throw new PackagerException("ERR_MissingArgument",
"--runtime-image or --module-path");
@@ -283,10 +283,14 @@
String getTargetFormat() {
return targetFormat;
}
+ boolean isTargetAppImage() {
+ return ("app-image".equals(targetFormat));
+ }
+
private static final Set<String> multi_args = new TreeSet<>(Arrays.asList(
StandardBundlerParam.JAVA_OPTIONS.getID(),
StandardBundlerParam.ARGUMENTS.getID(),
StandardBundlerParam.MODULE_PATH.getID(),
StandardBundlerParam.ADD_MODULES.getID(),
< prev index next >