mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-16 16:39:48 +00:00
8248122: java launcher should launch normally if JavaFX modules not found
Reviewed-by: kcr, prr, aivanov
This commit is contained in:
parent
9be6e77d73
commit
f59ee5acfc
@ -98,6 +98,8 @@ public final class LauncherHelper {
|
||||
"javafx.application.Application";
|
||||
private static final String JAVAFX_FXHELPER_CLASS_NAME_SUFFIX =
|
||||
"sun.launcher.LauncherHelper$FXHelper";
|
||||
private static final String JAVAFX_GRAPHICS_MODULE_NAME =
|
||||
"javafx.graphics";
|
||||
private static final String LAUNCHER_AGENT_CLASS = "Launcher-Agent-Class";
|
||||
private static final String MAIN_CLASS = "Main-Class";
|
||||
private static final String ADD_EXPORTS = "Add-Exports";
|
||||
@ -768,8 +770,9 @@ public final class LauncherHelper {
|
||||
* the main class may or may not have a main method, so do this before
|
||||
* validating the main class.
|
||||
*/
|
||||
if (JAVAFX_FXHELPER_CLASS_NAME_SUFFIX.equals(mainClass.getName()) ||
|
||||
doesExtendFXApplication(mainClass)) {
|
||||
if ((JAVAFX_FXHELPER_CLASS_NAME_SUFFIX.equals(mainClass.getName()) ||
|
||||
doesExtendFXApplication(mainClass)) &&
|
||||
ModuleLayer.boot().findModule(JAVAFX_GRAPHICS_MODULE_NAME).isPresent()) {
|
||||
// Will abort() if there are problems with FX runtime
|
||||
FXHelper.setFXLaunchParameters(what, mode);
|
||||
mainClass = FXHelper.class;
|
||||
@ -1082,9 +1085,6 @@ public final class LauncherHelper {
|
||||
|
||||
static final class FXHelper {
|
||||
|
||||
private static final String JAVAFX_GRAPHICS_MODULE_NAME =
|
||||
"javafx.graphics";
|
||||
|
||||
private static final String JAVAFX_LAUNCHER_CLASS_NAME =
|
||||
"com.sun.javafx.application.LauncherImpl";
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user