< prev index next > src/java.base/share/classes/sun/launcher/LauncherHelper.java
Print this page
"sun.launcher.LauncherHelper$FXHelper";
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";
private static final String ADD_OPENS = "Add-Opens";
+ private static final String ENABLE_NATIVE_ACCESS = "Enable-Native-Access";
private static StringBuilder outBuf = new StringBuilder();
private static final String INDENT = " ";
private static final String VM_SETTINGS = "VM settings:";
}
String opens = mainAttrs.getValue(ADD_OPENS);
if (opens != null) {
addExportsOrOpens(opens, true);
}
+ String enableNativeAccess = mainAttrs.getValue(ENABLE_NATIVE_ACCESS);
+ if (enableNativeAccess != null) {
+ if (!enableNativeAccess.equals("ALL-UNNAMED")) {
+ throw new IllegalArgumentException("Only ALL-UNNAMED allowed as value for " + ENABLE_NATIVE_ACCESS);
+ }
+ Modules.addEnableNativeAccessToAllUnnamed();
+ }
/*
* Hand off to FXHelper if it detects a JavaFX application
* This must be done after ensuring a Main-Class entry
* exists to enforce compliance with the jar specification
< prev index next >