Question

I need to specify system properties, i.e. smth like this "-Dx=1 -Dy=2" and pass it to the applet. Also - I launch it through JNLP.

Tried the following:

<j2se version="1.7+"  java_arguments="-Dx=1 -Dy=2" java-vm-args="-Dx=1 -Dy=2"/>

Also:

<applet-desc main-class="my.AppletLauncher"
             name="Demo Applet"
             width="1000"
             height="1000">
    <param name="java-vm-args" value="-Dx=1 -Dy=2"/>
    <param name="java_arguments" value="-Dx=1 -Dy=2"/>

Nothing helps.

Was it helpful?

Solution

Try with property tag:

<resources>
    <j2se version="1.7+"/>
    <property name="x" value="1"/>
    <property name="y" value="2"/>
</resources>

Also read this https://bugs.openjdk.java.net/browse/JDK-8023821 about setting properties using JNLP.

Hope it helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top