File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JNLP and Web Start and the fly likes Command line JNLP with App parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Command line JNLP with App parameters" Watch "Command line JNLP with App parameters" New topic
Author

Command line JNLP with App parameters

Indi Bamunuarachchi
Greenhorn

Joined: Feb 07, 2010
Posts: 3
Hi,

I want to call a JNLP file through JWS using command line. I'm wondering whether it is possible to pass application parameters in the command line cause those going to be dynamic.
My command line entry will looks similar to "c:\javaws http:\\xxx.xxx.xxx\Test.jnlp".
If its not possible, I'm thinking of passing a sys property value as -J-Dxxxx=yyyy. But it would be nice if I can pass app parameters.

Thanks,
Indi
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

What's wrong with putting the application parameters in the normal place in the JNLP file?
Indi Bamunuarachchi
Greenhorn

Joined: Feb 07, 2010
Posts: 3
In this case, params are going to be dynamic. so i want to pass different values each time.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

What's wrong with generating a new JNLP file containing those parameters each time?
Indi Bamunuarachchi
Greenhorn

Joined: Feb 07, 2010
Posts: 3
my plan is to keep the JNLP file in webserver. Let JWS to do what is suppose to do from deployment prospective. But pass dynamic parameters to the application by the “caller”, so I don’t need to dynamically create the JNLP each time.

Thanks Indi
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Okay. Then the command-line parameters will come from the web server's version of the JNLP file, since that's how JNLP files work. It follows from that design feature that the command-line parameters won't come from anywhere else.

Therefore if you want to pass in information which varies from one run to the next, but you want to use the same JNLP file for each of those runs, it follows that you can't use command-line parameters.
 
 
subject: Command line JNLP with App parameters