[jitsi-dev] WebStart with command line arguments


I had a look at how to pass command line arguments to Jitsi when
starting with WebStart

The javaws utility has a "-open" argument, it works like this:

    javaws -open sip:jitsi@example.org http://jitsi.org/phone.jnlp

It then runs the program's main method with args = { "-open",
"sip:jitsi@example.org" }

Jitsi itself doesn't know what "-open" means, so my latest patch (on
pull req #48) strips it out of the argument array, just leaving the URI.

Some people are generating a JNLP file with a servlet, like this:

- User clicks a link such as

- servlet takes the value of URL parameter "arg1" and creates arguments
or system properties in the JNLP on the fly, for example,

   <application-desc main-class="Jitsi">

This offers more flexibility than invoking javaws from the command line,
but it requires a servlet container and it requires extra effort for
signing the JNLP using JNLP Templates (requires JDK 7)

Using templates appears like a gamble though, the spec JSR-56 for JNLP
suggests that clients can restrict which arguments can be templated for
security reasons. They suggest that the codebase URL or icon can
usually be overridden but there is no guarantee that arbitrary command
line arguments will always be supported. This means that ultimately,
the servlet container may have to generate signed JNLP files and the
main JAR on the fly for each request.