/hg/icedtea-web: 2 new changesets
jvanek at icedtea.classpath.org
jvanek at icedtea.classpath.org
Mon May 28 10:29:58 UTC 2018
changeset 0b0da6841278 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=0b0da6841278
author: Jiri Vanek <jvanek at redhat.com>
date: Mon May 28 12:01:56 2018 +0200
Added missing changelog entry for "Made headless detection softer" 2018-05-24
changeset 348532e210c0 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=348532e210c0
author: Jiri Vanek <jvanek at redhat.com>
date: Mon May 28 12:29:35 2018 +0200
added deployment property to enforce headfull execution
* netx/net/sourceforge/jnlp/config/Defaults.java: IGNORE_HEADLESS_CHECK set to false
* netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java: deployment.headless.ignore
* netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java: if deployment.headless.ignore is true, then headless state is not checked and environment is always considered as headfull
diffstat:
ChangeLog | 16 +++++++-
netx/net/sourceforge/jnlp/config/Defaults.java | 5 ++
netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java | 2 +
netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 22 +++++++----
4 files changed, 36 insertions(+), 9 deletions(-)
diffs (88 lines):
diff -r 5290684409aa -r 348532e210c0 ChangeLog
--- a/ChangeLog Thu May 24 17:55:31 2018 +0200
+++ b/ChangeLog Mon May 28 12:29:35 2018 +0200
@@ -1,6 +1,20 @@
+2018-05-28 Jiri Vanek <jvanek at redhat.com>
+
+ added deployment property to enforce headfull execution
+ * netx/net/sourceforge/jnlp/config/Defaults.java: IGNORE_HEADLESS_CHECK set to false
+ * netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java: deployment.headless.ignore
+ * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java: if deployment.headless.ignore is true, then headless state is not checked
+ and environment is always considered as headfull
+
+2018-05-24 Jiri Vanek <jvanek at redhat.com>
+
+ Made headless detection softer
+ * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java: JWindow().getOwner() repalced by GraphicsEnvironment.isHeadless()
+ JWindow().getOwner() was failing on headfull systems after headless check itself, on NPE.
+
2018-05-14 Jiri Vanek <jvanek at redhat.com>
- * netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java: getDocumentBase no returns codeBase as fallback when
+ * netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java: getDocumentBase now returns codeBase as fallback when
documentBase is null. Oracle Applications R12, Oracle Forms Java Webstart application is requesting getDocumentBase
where it shouldn't, however they refuse to modify their code and add ITW to supported platforms
diff -r 5290684409aa -r 348532e210c0 netx/net/sourceforge/jnlp/config/Defaults.java
--- a/netx/net/sourceforge/jnlp/config/Defaults.java Thu May 24 17:55:31 2018 +0200
+++ b/netx/net/sourceforge/jnlp/config/Defaults.java Mon May 28 12:29:35 2018 +0200
@@ -412,6 +412,11 @@
BasicValueValidators.getRangedIntegerValidator(0, 10000),
String.valueOf(500)
},
+ {
+ DeploymentConfiguration.IGNORE_HEADLESS_CHECK,
+ BasicValueValidators.getBooleanValidator(),
+ String.valueOf(false)
+ },
//JVM arguments for plugin
{
DeploymentConfiguration.KEY_PLUGIN_JVM_ARGUMENTS,
diff -r 5290684409aa -r 348532e210c0 netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java
--- a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java Thu May 24 17:55:31 2018 +0200
+++ b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java Mon May 28 12:29:35 2018 +0200
@@ -222,6 +222,8 @@
public static final String KEY_BROWSER_PATH = "deployment.browser.path";
public static final String KEY_UPDATE_TIMEOUT = "deployment.javaws.update.timeout";
+
+ public static final String IGNORE_HEADLESS_CHECK = "deployment.headless.ignore";
/*
* JVM arguments for plugin
diff -r 5290684409aa -r 348532e210c0 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
--- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Thu May 24 17:55:31 2018 +0200
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Mon May 28 12:29:35 2018 +0200
@@ -739,18 +739,24 @@
//if (GraphicsEnvironment.isHeadless()) // jdk1.4+ only
// headless = true;
try {
- if ("true".equalsIgnoreCase(System.getProperty("java.awt.headless"))){
+ if ("true".equalsIgnoreCase(System.getProperty("java.awt.headless"))) {
headless = true;
}
if (!headless) {
- try {
- if (GraphicsEnvironment.isHeadless()) {
- throw new HeadlessException();
+ boolean noCheck = Boolean.valueOf(JNLPRuntime.getConfiguration().getProperty(DeploymentConfiguration.IGNORE_HEADLESS_CHECK));
+ if (noCheck) {
+ headless = false;
+ OutputController.getLogger().log(DeploymentConfiguration.IGNORE_HEADLESS_CHECK + " set to " + noCheck + ". Avoding headless check.");
+ } else {
+ try {
+ if (GraphicsEnvironment.isHeadless()) {
+ throw new HeadlessException();
+ }
+ } catch (HeadlessException ex) {
+ headless = true;
+ OutputController.getLogger().log(ex);
+ OutputController.getLogger().log(OutputController.Level.MESSAGE_ALL, Translator.R("HEADLESS_MISSCONFIGURED"));
}
- } catch (HeadlessException ex) {
- headless = true;
- OutputController.getLogger().log(ex);
- OutputController.getLogger().log(OutputController.Level.MESSAGE_ALL, Translator.R("HEADLESS_MISSCONFIGURED"));
}
}
} catch (SecurityException ex) {
More information about the distro-pkg-dev
mailing list