11

Can I launch a Java WebStart application with a set of parameters just like an applet is configured with the <param> tags ?

Thanks

2 Answers 2

14

Yeah you can, the following shows an example:

<application-desc main-class="my.main.class">
    <argument>-user=bob</argument>
    <argument>-pass=8jkaiuasu</argument>
</application>

Showing you passing the arguments "-user=bob" and "-pass=8jkaiuasu" to the application. Arguments are picked up in the standard way.

Sign up to request clarification or add additional context in comments.

2 Comments

I think editing jnlp is a static solution, I mean imagine a web form where the user enter parameters before launching, Would the server need to write a jnlp file for every user click? it seems that there should be a better way
@HernánEche in this cause you use a servlet or other server side script to replace the values in the jnlp as it is serving the jnlp filefile
2

Yes, check out the JNLP Tag reference

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.