--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/AbstractImageBundler.java Mon Mar 11 13:31:48 2019 -0400
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/AbstractImageBundler.java Mon Mar 11 14:44:00 2019 -0400
@@ -59,17 +59,6 @@
throws ConfigException {
StandardBundlerParam.validateMainClassInfoFromAppResources(p);
- boolean hasMainJar = MAIN_JAR.fetchFrom(p) != null;
- boolean hasMainModule =
- StandardBundlerParam.MODULE.fetchFrom(p) != null;
- boolean hasMainClass = MAIN_CLASS.fetchFrom(p) != null;
- boolean runtime = RUNTIME_INSTALLER.fetchFrom(p);
-
- if (!hasMainJar && !hasMainModule && !hasMainClass && !runtime) {
- throw new ConfigException(
- I18N.getString("error.no-application-class"),
- I18N.getString("error.no-application-class.advice"));
- }
}
public static void extractFlagsFromVersion(
@@ -121,8 +110,8 @@
}
protected File createRoot(Map<String, ? super Object> p,
- File outputDirectory, boolean dependentTask,
- String name, String jlinkKey) throws PackagerException {
+ File outputDirectory, boolean dependentTask, String name)
+ throws PackagerException {
if (!outputDirectory.isDirectory() && !outputDirectory.mkdirs()) {
throw new RuntimeException(MessageFormat.format(
I18N.getString("error.cannot-create-output-dir"),
@@ -143,16 +132,10 @@
File rootDirectory = new File(outputDirectory, name);
if (rootDirectory.exists()) {
- if (!(OVERWRITE.fetchFrom(p))) {
- throw new PackagerException("error.root-exists-without-overwrite",
- rootDirectory.getAbsolutePath());
- }
- try {
- IOUtils.deleteRecursive(rootDirectory);
- } catch (IOException ioe) {
- throw new PackagerException(ioe);
- }
+ throw new PackagerException("error.root-exists",
+ rootDirectory.getAbsolutePath());
}
+
rootDirectory.mkdirs();
return rootDirectory;