Hi all,
I want to be able to associate Windows Shell registry actions (shellExecute from right click menu, double click, and protocols) with a Webstart Java Swing desktop app. This is pretty key to our deployment strategy.
I have two options that I'm pursuing right now.
OPTION A
Unfortunately I'm encountering a few problems:
1) javaws.exe does not accept parameters, therefore I can't pass parameters directly from a Windows command line
2) The only way to get arguments in is through the jnlp file. Sounds like this is possible using a jnlp written by a servlet. But can I just pass GET parameters to my servlet like so?
http://webstart.com/go/?param=value¶m2=value2
Would that work?
2a) subissue: I want to use JNLP's SingleInstance to make sure that only one of my app is running at any time. It sounds like that JNLP interface also allows for new parameters to be passed in as arguments... but if I pass in parameters to my webstart address, will SingleInstance properly recognize that http://webstart/go and http://webstart/go?param=value are the same program?
OPTION B
So the alternative deployment strategy that I'm contemplating is using webstart, but then deploying a separate .jar to the machine and registering that to be the argument acceptor from Windows. So windows would run something like so:
java -jar cmdLauncher.jar argshere
From there I will do two things:
a) If the program is already running, then I pass the argument in using network sockets and deal with it like so.
b) If the program isn't already running, then I execute javaws http://myurl and then maybe write to the socket when it's ready. This might really suck since i'll have to poll until the socket is ready.
Anyway, was hoping someone with more webstart internals had some idea as to
a) would a option A (dynamic servlet) work in the way I expect?
b) Is option B the only way to really do it? It certainly seems feasible at this point.
Ideally I just wish javaws.exe allowed passing arguments, and thus this entire problem would not exist. It's a pretty powerful and important feature for WebStart to be able to be a fully featured deployment solution.