2016-04-08 36 views
2

我想用JNLP啓動applet。我想將一些參數動態地傳遞給applet。我的JNLP文件看起來像動態設置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

這可能會給出一個想法,如果你沒有在這裏http://stackoverflow.com/questions/13721587/pass-dynamic-params-via-jnlp – kakurala

+0

我從上面的鏈接,但我如何得到請求對象在.jnlp文件中。 –

回答