On 10/24/2012 04:17 PM, Boris Goldowsky wrote:
> Any idea what could be causing the web-start version of XXE to fail with Java
> 7 on Windows?
>
> xxe.jnlp downloads, and Java starts up, but then nothing happens. This does
> not seem to be a problem with Java 6.
>
> If I try to launch manually with "javaws xxe.jnlp", I get an error like this:
>
> InvalidArgumentException[ Invalid arguments supplied: { }]
> at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
> at com.sun.javaws.Main.access$000(Unknown Source)
> at com.sun.javaws.Main$1.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
> We're seeing this with both XXE 5.2.1 and 5.4.
>
Here what happens:
javaws.exe launches "javaw.exe com.sun.javaws.Main" passing it a number
of arguments, including a copy of the .jnlp file. However, some of these
arguments are taken from the .jnlp file.
In the case of XXE, xxe.jnlp contains several of the following property
elements:
---
<property name="javaws.XXE.configurations"
value="addon:config/dita/bookmap.xxe;addon:EXTRA/sample_customize_xxe/customize.xxe;addon:config/dita/ditaval.xxe;addon:config/docbook/docbook.xxe;addon:config/docbook5/docbook5.xxe;addon:config/dita/map.xxe;addon:EXTRA/mathml_config/standalone/mathml.xxe;addon:config/dita/topic.xxe;addon:config/xhtml/xhtml11.xxe;addon:config/xhtml/xhtml5.xxe;addon:config/xhtml/xhtml_loose.xxe;addon:config/xhtml/xhtml_strict.xxe"/>
<property name="javaws.XXE.catalogs"
....
---
The above properties are converted to -Dxxx=yyy arguments passed to
"javaw.exe com.sun.javaws.Main". For example:
---
-Djavaws.XXE.configurations=addon:config/dita/bookmap.xxe;addon:EXTRA/sample_customize_xxe/customize.xxe;addon:config/dita/ditaval.xxe;addon:config/docbook/docbook.xxe;addon:config/docbook5/docbook5.xxe;addon:config/dita/map.xxe;addon:EXTRA/mathml_config/standalone/mathml.xxe;addon:config/dita/topic.xxe;addon:config/xhtml/xhtml11.xxe;addon:config/xhtml/xhtml5.xxe;addon:config/xhtml/xhtml_loose.xxe;addon:config/xhtml/xhtml_strict.xxe
-Djavaws.XXE.catalogs=...
---
Note that doing this does not make sense. The application is simply
expecting to have the system properties set before it starts.
Implementing this does not require passing a bunch of -Dxxx=yyy
arguments to javaw.exe. Suffice for com.sun.javaws.Main to parse the
.jnlp file and to call System.setProperty().
On Windows, the command-line cannot exceed 8191 characters (32767 with
CreateProcess). This limit causes the cryptic error message you got.
On Linux, there is not such limit (or is it 2097152?). Hence, no problem.
This problem happens only with Java 7 on Windows. With Java 6 on
Windows, javaws.exe launches "javaw.exe com.sun.javaws.Main" with hard
to understand, somewhat inconsistent, arguments. However, the resulting
command-line is much shorter than with Java 7, hence no problem with Java 6.
With the applet there is no such problem on Windows and on Linux.
I'm not sure that I'll file a bug report to the Java dev team. After
all, it's a Windows limit. We'll try to find a strategy other than
<property> in the .jnlp file to pass information to XXE when started
using Java Web Start.
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support