开发者

how to pass system properties to Java applet launched from HTML

Here is my applet:

<applet id="MyApplet" 
    code="com.my.MyApplet"
    archive="my.jar"
    myscript>
</applet>

How would one pass "-D" properties to this applet (similar to 'java -Dprop=val ... ' from a j开发者_运维百科ava launcher) ? I would like to pass some java security properties for this applet when launched.


You can use a special param to pass -D values to Applets.

<param name="java_arguments" value="-Dsun.java2d.noddraw=true">

You can find the documentation here


include param tags inside your applet tag:

<param name="flavor" value="strawberry">
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜