< prev index next >

src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacAppImageBuilder.java

Print this page

        

@@ -109,11 +109,19 @@
                         String identifier = extractBundleIdentifier(params);
                         if (identifier != null) {
                             return identifier;
                         }
 
-                        return IDENTIFIER.fetchFrom(params);
+                        identifier = IDENTIFIER.fetchFrom(params);
+                        if (identifier != null) {
+                            return identifier;
+                        }
+                        // the IDENTIFIER (above) will default to derive from
+                        // the main-class, in case there is no main-class
+                        // (such as runtime installer) revert to the name.
+                        // any of these could be invalid, so check later.
+                        return APP_NAME.fetchFrom(params);
                     },
                     (s, p) -> s);
 
     public static final BundlerParamInfo<String> MAC_CF_BUNDLE_VERSION =
             new StandardBundlerParam<>(
< prev index next >