关于JNLP的几点备忘录

1. 同一个JNLP里面的jar必须用同一个cert签名

 

2. JNLP的security和jar的签名情况必须一致

 

3. 不同的jar如果用不同的cert签名,可以通过不同的jnlp来实现:content extension, 例如:

 

He discovered that if you have multiple JNLP files, all jars mentioned by each JNLP file must be signed with the same certificate, but different JNLP files can be signed with different certificates. Your master JNLP file includes an auxiliary JNLP file (which references jars signed with a different certificate) by inserting a line like this in the <resources> section:


<extension href="http://dawes.za.net/rogan/webscarab/lib/help.jnlp" name="Java Help"/>

 

4. 可以用JNLP来部署applet, 但是applet不是在浏览器里面运行的。

 

It is also possible to distribute your Applets with JWS. Then they run without a browser. You need to add an <applet-desc section to your JNLP file.

<applet-desc
    documentBase="http://mindprod.com/applets"
    name="Wassup"
    main-class="com.mindprod.wassup.Wassup"
    width="540"
    height="310">
  <param name="milkshake" value="strawberry" />
  <param name="fruit" value="peach" />
</applet-desc>

 

5. 如果一个类在不同的jar里面被定义了,具体使用哪个要看加载的顺序。

 

which Logger is inited depends on the loading sequence.

        <jar href="T/jar2_mix.jar" />
        <jar href="T/jar1.jar" />

=> I am in org.apache.log 2

        <jar href="T/jar1.jar" />
        <jar href="T/jar2_mix.jar" />


=> I am in org.apache.log 1

 

 

你可能感兴趣的:(jar,File,Security,resources,extension,applet)