How to pass command line arguments to Web Start appclient?

Hi,I would like to pass arguments to appclient, but "javaws" unable to do that.Do I have to overwrite the JNLP? I use Sun Appserver 9.0, it creates JNLP on the fly!!!Please help, thanx!MB
[222 byte] By [mbazsa] at [2007-11-27 6:35:32]
# 1

Hi, MB.

If you are talking about the automatic Java Web Start support for launching app clients in GlassFish, you can pass the equivalent of command line arguments using the query string of the URL you use to launch the app client.

Briefly, use

http://host:port/client-path?arg=first-arg&arg=second-arg& ...

specifying the argument values in the order that you want them passed to the client.

The GlassFish server will do the right thing and generates the correct JNLP so your arguments are passed to the app client.

The GlassFish developer's guide http://glassfish.dev.java.net/nonav/javaee5/docs/AS91DG.pdf discusses this and all aspects of the Java Web Start support. You can also take a look at this blog entry http://blogs.sun.com/quinn/entry/command_line_arguments_and_properties that focuses on how to pass arguments.

Since this technique deals with argument passing in the URL, it works no matter how you launch the app client: a URL in a browser, the javaws command, etc.

- Tim

tjquinna at 2007-7-12 18:02:37 > top of Java-index,Desktop,Deploying...