I have a java applet application which is accessed by our customers through our website. Since Microsoft edge and chrome stopped supporting java plug in, we converted the applet to be launched through JNLP and Java Web Start, Unfortunately, In both browsers the JNLP downloaded and the customer should double click the file in order to launch a Java Web Start.
Our customers totally disappointed from this behavior, And I'm trying to find a solution for this issue.
Possible solutions
1) Change the behavior in the browser to ask the user what to do when he click on a JNLP link
. Then the user can select Open with: Java web start launcher
or save file
.
edit It's working in Firefox but it doesn't work with Chrome: see related bug reports 10877 and the open issues
2) Provide a script to the user which executes
javaws https://example.com/your_application.jnlp
An example for demonstration (application link taken from Oracle tutorial: Running a Java Web Start Application)
javaws https://docs.oracle.com/javase/tutorialJWS/samples/deployment/NotepadJWSProject/Notepad.jnlp
This will open a simple Java application.
edit For the fearless there is a hacky solution for Chrome.
chrome.[so|dll]
the bytes jnlp
and patch them as e.g. jnl-
Preferences
and amend it as ....
"download": {
...
"extensions_to_open": "jnlp",
...
},
Next time you click on a link to a JNLP file it will be opened automatically (with the application which is assigned to open this file type, normally it's javaws
).
The property was found after having a look into the source pref_names.cc. But Chrome treat the extension jnlp
as dangerous that's why we need to patch the library as well.