WebStart associations issue
Hi all!
I've a problem with file association in my application deployed with Java Web Start. Here there is a part of my jnlp:
<jnlp spec="1.5" codebase="..." href="...">
<information>
... title, vendor, homepage, descriptions, icons...
<shortcut online="true">
<desktop/>
<menu submenu="Rintal - Project"/>
</shortcut>
<association extensions="rintal" mime-type="application-x/rintal"/>
<offline-allowed/>
</information>
<security> <all-permissions/> </security>
<update check="timeout" policy="always"/>
<resources> .... </resources>
</jnlp>
In Windows XP, if i open a file *.rintal doesn't start my application, but starts the "choose application" interface. But not with any version of java:
with JRE 5.0 (any update): WORKS
with JRE 6.0: DOESN'T WORK
with JRE 6.0 u1: WORKS
with JRE 6.0 u2: DOESN'T WORK
Well, if i change the associations tag whith this:
<association extensions="rin" mime-type="x-application/rin"/>
it works with all jre versions (naturally opens *.rin files).
Many people work with my application and i need it works with any java version...
What can i do with my *.rintal files?
Thanks,
Daniele
[1675 byte] By [
daniele7a] at [2007-11-27 9:52:07]

# 1
Hi all again!
I've some news.
I wrote a simple jnlp to better understand the problem. Here there is the complete code:
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.5" codebase="file:///C:/TestAssociation" href="TestAssociation.jnlp">
<information>
<title>TestAssociation</title>
<vendor>Vendor</vendor>
<association mime-type="application-x/abcdef" extensions="abcdef"/>
</information>
<resources>
<j2se version="1.5+"/>
<jar href="TestAssociation.jar" main="true" download="eager"/>
</resources>
<application-desc main-class="TestAssociation"/>
</jnlp>
TestAssociation.jar contains only TestAssociation.class and here there is its code:
public class TestAssociation {
public static void main(String[] args) {
javax.swing.JOptionPane.showMessageDialog(null, "Application Launched!");
}
}
I try on Windows XP with JRE 6.0 update 2 and WORKS with any extension except 'rintal'.............
If I replace the association tag with this one:
<association mime-type="application-x/rintal" extensions="rintal"/>
when i double click on jnlp file appears JWS Error Dialog whith these details:
java.lang.NullPointerException
at com.sun.javaws.LocalInstallHandler.promptReplace(Unknown Source)
at com.sun.javaws.LocalInstallHandler.registerAssociation(Unknown Source)
at com.sun.javaws.LocalInstallHandler.createAssociations(Unknown Source)
at com.sun.javaws.LocalInstallHandler.install(Unknown Source)
at com.sun.javaws.Launcher.notifyLocalInstallHandler(Unknown Source)
at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Does anybody know where is my mistake?
Thanks,
Daniele