开发者

How do I start a JNLP application programmatically?

I have a working JNLP application开发者_运维知识库, but would like to add some end-to-end smoke test.

Is it possible given an URL to download, start and programatically manipulate a JNLP application?


You can use the javaws tool (part of the JDK) to start a WebStart app. To programmatically manipulate it, you can use any of a number of testing tools and frameworks that simulate user input.


To start an JNLP application programatically(Linux) you could do something like this:

public static void main(String[] args) throws IOException, InterruptedException {
    String[] cmd = {"/usr/java/jdk1.6.0_17_limpo/jre/javaws/javaws", "/opt/exata/projetosNB/InterfaceVisualizador/dist/launch.jnlp"};
    Process p = Runtime.getRuntime().exec(cmd);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜