It is years since I have worked in Java (that's my excuse).
I am trying to launch a Java Swing UI as an Applet (previously done via Web Start).
I have modified the jnlp file to reflect the changes that I know are necessary for an applet (e.g. using applet-desc instead of application-desc).
Inside the <resources>
tag in the jnlp file we set system properties like this:
<property name="java.security.auth.login.config" value="$$context/app/auth.conf"/>
In the init method of the main class we try to read some of these system properties and always get "null" as the value.
Does anyone have any ideas why the system properties aren't "sticking"?
Possibly related strangeness: I have Java set to open the console when something runs. When I load the page with this applet, the console windows opens TWICE, both windows showing the details of loading the jnlp, but only one window continues with the full app load.
UPDATE:
Here is the jnlp file:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" >
<information>
<title>app</title>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.6+" java-vm-args="-Xms128m -Xmx1024m -Xss1m"/>
<property name="java.naming.factory.initial" value="org.jboss.naming.HttpNamingContextFactory"/>
<property name="java.naming.factory.url.pkgs" value="org.jboss.naming:org.jnp.interfaces"/>
<property name="java.naming.provider.url" value="$$context/invoker/JNDIFactory"/>
<property name="java.security.policy" value="$$context/app/server.policy"/>
<property name="java.security.auth.login.config" value="$$context/app/auth.conf"/>
<property name="login.context" value="client-login"/>
<property name="jndi.port" value="1099"/>
<property name="service.impl" value="Remote"/>
<property name="polling" value="true"/>
<jar href="cglib-2.1.3.jar"/>
<jar href="com.jdas.apps.binmgmt.gui.jar" main="true"/>
<jar href="commons-beanutils.jar"/>
<jar href="commons-collections-2.1.1.jar"/>
<jar href="commons-javaflow.jar"/>
<jar href="commons-lang.jar"/>
<jar href="commons-logging.jar"/>
<jar href="ecs-1.4.1.jar"/>
<jar href="hibernate3.jar"/>
<jar href="itext-1.01.jar"/>
<jar href="jade-5.2.3_AGRIS_PATCH.jar"/>
<jar href="jbossall-client.jar"/>
<jar href="jboss-j2ee.jar"/>
<jar href="jcalendar-1.1.4-agris.jar"/>
<jar href="jhall-3.1.3.jar"/>
<jar href="looks-all-1.1.jar"/>
<jar href="odmg-3.0.jar"/>
<jar href="pvjdbc2.jar"/>
<jar href="swing-layout-1.0.jar"/>
<extension name="additional" href="unsigned.jnlp"/>
</resources>
<applet-desc main-class="com.jdas.apps.binmgmt.gui.main.BinManagementApp" name="binMgmt" width="1024" height="768" >
</applet-desc>
</jnlp>
JFrame
,JApplet
..? – Hines