John
John

Reputation: 113

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 java launcher) ? I would like to pass some java security properties for this applet when launched.

Upvotes: 5

Views: 4495

Answers (2)

Steve K
Steve K

Reputation: 19586

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

Upvotes: 10

Brad Mace
Brad Mace

Reputation: 27886

include param tags inside your applet tag:

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

Upvotes: -2

Related Questions