Passing command line arguments to javaws (Java WebStart) executable

后端 未结 3 636
春和景丽
春和景丽 2020-12-08 23:05

Summary for those who might not want to read that much:

How do I do this: ? If we could pass ad-hoc command-line args to javaws, then javaws apps could be more like

3条回答
  •  生来不讨喜
    2020-12-08 23:47

    There is nothing to confuse. The very straight answer which I tested and it is working perrfect.

    To send the command line argument to any JNLP is very simple.

    command prompt > javaws -open space arg1 space arg2 ... space arg n JNLP url

    Ex:

    c:\>javaws -open arg1 arg2 arg3 c:\myjnlp.jnlp

    But remember one thing, We can get the -open also as args[0] in main method, so just avoid args[0]. Also it is not possible to avoid -open with direct argument prepixed with -.

提交回复
热议问题