|
|
4e0e32 |
diff -r b64b383a4561 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
|
|
|
4e0e32 |
--- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Mon May 14 17:11:41 2018 +0200
|
|
|
4e0e32 |
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Wed May 23 10:35:17 2018 +0200
|
|
|
4e0e32 |
@@ -19,6 +19,9 @@
|
|
|
4e0e32 |
import static net.sourceforge.jnlp.runtime.Translator.R;
|
|
|
4e0e32 |
|
|
|
4e0e32 |
import java.awt.EventQueue;
|
|
|
4e0e32 |
+import java.awt.GraphicsEnvironment;
|
|
|
4e0e32 |
+import static java.awt.GraphicsEnvironment.isHeadless;
|
|
|
4e0e32 |
+import java.awt.HeadlessException;
|
|
|
4e0e32 |
import java.io.File;
|
|
|
4e0e32 |
import java.io.FileInputStream;
|
|
|
4e0e32 |
import java.io.FileOutputStream;
|
|
|
4e0e32 |
@@ -741,8 +744,10 @@
|
|
|
4e0e32 |
}
|
|
|
4e0e32 |
if (!headless) {
|
|
|
4e0e32 |
try {
|
|
|
4e0e32 |
- new JWindow().getOwner();
|
|
|
4e0e32 |
- } catch (Exception ex) {
|
|
|
4e0e32 |
+ if (GraphicsEnvironment.isHeadless()) {
|
|
|
4e0e32 |
+ throw new HeadlessException();
|
|
|
4e0e32 |
+ }
|
|
|
4e0e32 |
+ } catch (HeadlessException ex) {
|
|
|
4e0e32 |
headless = true;
|
|
|
4e0e32 |
OutputController.getLogger().log(ex);
|
|
|
4e0e32 |
OutputController.getLogger().log(OutputController.Level.MESSAGE_ALL, Translator.R("HEADLESS_MISSCONFIGURED"));
|
|
|
4e0e32 |
diff -r 0b0da6841278 -r 348532e210c0 netx/net/sourceforge/jnlp/config/Defaults.java
|
|
|
4e0e32 |
--- a/netx/net/sourceforge/jnlp/config/Defaults.java Mon May 28 12:01:56 2018 +0200
|
|
|
4e0e32 |
+++ b/netx/net/sourceforge/jnlp/config/Defaults.java Mon May 28 12:29:35 2018 +0200
|
|
|
4e0e32 |
@@ -412,6 +412,11 @@
|
|
|
4e0e32 |
BasicValueValidators.getRangedIntegerValidator(0, 10000),
|
|
|
4e0e32 |
String.valueOf(500)
|
|
|
4e0e32 |
},
|
|
|
4e0e32 |
+ {
|
|
|
4e0e32 |
+ DeploymentConfiguration.IGNORE_HEADLESS_CHECK,
|
|
|
4e0e32 |
+ BasicValueValidators.getBooleanValidator(),
|
|
|
4e0e32 |
+ String.valueOf(false)
|
|
|
4e0e32 |
+ },
|
|
|
4e0e32 |
//JVM arguments for plugin
|
|
|
4e0e32 |
{
|
|
|
4e0e32 |
DeploymentConfiguration.KEY_PLUGIN_JVM_ARGUMENTS,
|
|
|
4e0e32 |
diff -r 0b0da6841278 -r 348532e210c0 netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java
|
|
|
4e0e32 |
--- a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java Mon May 28 12:01:56 2018 +0200
|
|
|
4e0e32 |
+++ b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java Mon May 28 12:29:35 2018 +0200
|
|
|
4e0e32 |
@@ -222,6 +222,8 @@
|
|
|
4e0e32 |
|
|
|
4e0e32 |
public static final String KEY_BROWSER_PATH = "deployment.browser.path";
|
|
|
4e0e32 |
public static final String KEY_UPDATE_TIMEOUT = "deployment.javaws.update.timeout";
|
|
|
4e0e32 |
+
|
|
|
4e0e32 |
+ public static final String IGNORE_HEADLESS_CHECK = "deployment.headless.ignore";
|
|
|
4e0e32 |
|
|
|
4e0e32 |
/*
|
|
|
4e0e32 |
* JVM arguments for plugin
|
|
|
4e0e32 |
diff -r 0b0da6841278 -r 348532e210c0 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
|
|
|
4e0e32 |
--- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Mon May 28 12:01:56 2018 +0200
|
|
|
4e0e32 |
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Mon May 28 12:29:35 2018 +0200
|
|
|
4e0e32 |
@@ -739,18 +739,24 @@
|
|
|
4e0e32 |
//if (GraphicsEnvironment.isHeadless()) // jdk1.4+ only
|
|
|
4e0e32 |
// headless = true;
|
|
|
4e0e32 |
try {
|
|
|
4e0e32 |
- if ("true".equalsIgnoreCase(System.getProperty("java.awt.headless"))){
|
|
|
4e0e32 |
+ if ("true".equalsIgnoreCase(System.getProperty("java.awt.headless"))) {
|
|
|
4e0e32 |
headless = true;
|
|
|
4e0e32 |
}
|
|
|
4e0e32 |
if (!headless) {
|
|
|
4e0e32 |
- try {
|
|
|
4e0e32 |
- if (GraphicsEnvironment.isHeadless()) {
|
|
|
4e0e32 |
- throw new HeadlessException();
|
|
|
4e0e32 |
+ boolean noCheck = Boolean.valueOf(JNLPRuntime.getConfiguration().getProperty(DeploymentConfiguration.IGNORE_HEADLESS_CHECK));
|
|
|
4e0e32 |
+ if (noCheck) {
|
|
|
4e0e32 |
+ headless = false;
|
|
|
4e0e32 |
+ OutputController.getLogger().log(DeploymentConfiguration.IGNORE_HEADLESS_CHECK + " set to " + noCheck + ". Avoding headless check.");
|
|
|
4e0e32 |
+ } else {
|
|
|
4e0e32 |
+ try {
|
|
|
4e0e32 |
+ if (GraphicsEnvironment.isHeadless()) {
|
|
|
4e0e32 |
+ throw new HeadlessException();
|
|
|
4e0e32 |
+ }
|
|
|
4e0e32 |
+ } catch (HeadlessException ex) {
|
|
|
4e0e32 |
+ headless = true;
|
|
|
4e0e32 |
+ OutputController.getLogger().log(ex);
|
|
|
4e0e32 |
+ OutputController.getLogger().log(OutputController.Level.MESSAGE_ALL, Translator.R("HEADLESS_MISSCONFIGURED"));
|
|
|
4e0e32 |
}
|
|
|
4e0e32 |
- } catch (HeadlessException ex) {
|
|
|
4e0e32 |
- headless = true;
|
|
|
4e0e32 |
- OutputController.getLogger().log(ex);
|
|
|
4e0e32 |
- OutputController.getLogger().log(OutputController.Level.MESSAGE_ALL, Translator.R("HEADLESS_MISSCONFIGURED"));
|
|
|
4e0e32 |
}
|
|
|
4e0e32 |
}
|
|
|
4e0e32 |
} catch (SecurityException ex) {
|
|
|
4e0e32 |
|
|
|
4e0e32 |
|