Question

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?

Was it helpful?

Solution

I have the same issue while starting a webstart application with a desktop icon and java 7. Only this combination fails. Starting with the link, the jnlp file or with Java 6 has no issues.

This occurs because of the Java version of the client, not the web browser. The exception is being thrown by the Java web Start when calling method "continueInSecureThread", which probably has different method signature on JRE7 than it had on previous versions. from SAP Forum conversation

Setting content type could help too aResponse.setContentType("application/x-java-jnlp-file");

Seems quite reasonable to me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top