I am working on some application that must start another app using Java web start. The way it is designed is like this :
String commandArg = new String(
"http://143.56.56.56:8088/configuratorhome/controller?configurationid=1222222222222222222222222222222222222222222222222222222222222c&versionstamp=21593&location=England&applicationlocale=en_US&qo_productid=6178&offline=false&configurationtype=normal&project_name=Devgen+Seeds&customer_no=AAA+MYCompany+Heid+Angebote+09&project_no=A09%2F0356&user_initials=JEJ&group_name=CHD&customer_name=AAA+MYCompany++Heid+Angebote+09&conf_access_right=udv_server&project_contact_name=&product_next_version_no=2&product_version_no=1&product_locale=England&user_name=Jens+Jakobsen&header_phone=5555+55556+5555&header_zipcode=A-79000&header_mail=heid%40cimbria.com&header_fax=-&header_address2=-&header_town=Stockerau&header_country=Austria&header_name=Mycomp+Heid+GmbH&header_address1=Heid-Werkstrasse+4&");
String[] command = new String[] { "javaws", "\"" + commandArg + "\"" };
// Runtime.getRuntime().exec(command);
Process proc = new ProcessBuilder(command).start();
When I run this app I get the following exception :
InvalidArgumentException[ Invalid arguments supplied: { }]
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
But it actually depends on how do I run it. If I use Java 6 64bit from command line it fails as mentioned. But from inside eclipse works fine without throwing the exception. When I run it from a PC with Java6 32 bit fails anyway.
Secondly if I make the command argument smaller it works. Therefore depending on the length of the command I get the exception or not. But in Eclipse it works no matter of the length of the command.
I can't understand why this behavior?