动态设置jnlp的param值

时间:2016-04-08 07:34:47

标签: java applet jnlp

我正在尝试使用JNLP启动applet。我想动态地将一些参数传递给applet。我的JNLP文件看起来像

<?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://localhost:8080/WebAppTest/jar/" href="">
        <information>
            <title>JNLP Test</title>
            <vendor>Java</vendor>
        </information> 
        <resources>
            <!-- Application Resources -->
            <j2se version="1.5+" />
            <jar href="test.jar" main="true" />            
        </resources>
        <security>
            <all-permissions/>
        </security>
        <applet-desc 
             name="Test Applet"
             main-class="com.test.TestApplet.class"
             width="100"
             height="30">
             <param name="testStr" value="something" />
        </applet-desc>
        <update check="background"/>
    </jnlp>

我想动态设置 testStr 值。

0 个答案:

没有答案
相关问题