diff options
author | Glenn Adams <gadams@apache.org> | 2012-04-13 06:28:25 +0000 |
---|---|---|
committer | Glenn Adams <gadams@apache.org> | 2012-04-13 06:28:25 +0000 |
commit | 67b05aa1dde10b581428a70ed951396bd4a37c6e (patch) | |
tree | e20160d9e125ec09722f4750f77ae30c92e0b0f5 /fop.js | |
parent | 586396e38c1c22d12d44e76cfdb36606f67a914f (diff) | |
download | xmlgraphics-fop-67b05aa1dde10b581428a70ed951396bd4a37c6e.tar.gz xmlgraphics-fop-67b05aa1dde10b581428a70ed951396bd4a37c6e.zip |
Bugzilla #50062: Invoke JVM in headless mode from FOP command scripts and JS shell to prevent stealing focus from GUI applications.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1325624 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'fop.js')
-rw-r--r-- | fop.js | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -18,6 +18,7 @@ // rpm_mode is irrelevant on Windows
// var rpm_mode=true;
+var java_exec_args = "-Djava.awt.headless=true";
var fop_exec_args = "";
var no_config=false;
var fop_exec_debug=false;
@@ -62,6 +63,7 @@ function read_args() { WScript.Echo("keepopen: " + keep_open);
WScript.Echo("noconfig: " + no_config);
WScript.Echo("help: " + show_help);
+ WScript.Echo("java arguments: " + java_exec_args);
WScript.Echo("fop arguments: " + fop_exec_args);
}
}
@@ -220,6 +222,7 @@ function get_local_classpath() { // Execute fop via shell.Exec
function fop_exec() {
var fop_exec_command = "\"" + javacmd + "\" "
+ + java_exec_args + " "
+ (config.Exists("JAVA_OPTS")?config.Item("JAVA_OPTS") + " ":"")
+ (config.Exists("LOGCHOICE")?config.Item("LOGCHOICE") + " ":"")
+ (config.Exists("LOGLEVEL")?config.Item("LOGLEVEL") + " ":"")
@@ -252,6 +255,7 @@ function fop_exec() { function fop_run() {
var fop_exec_command = "cmd /" + (keep_open?"K":"C") + " \""
+ "\"" + javacmd + "\" "
+ + java_exec_args + " "
+ (config.Exists("JAVA_OPTS")?config.Item("JAVA_OPTS") + " ":"")
+ (config.Exists("LOGCHOICE")?config.Item("LOGCHOICE") + " ":"")
+ (config.Exists("LOGLEVEL")?config.Item("LOGLEVEL") + " ":"")
|