How to make java web launch run automatically without double clicking on JNLP

I have a Java applet application that is accessed by our customers through our website. Since Microsoft edge and chrome ceased to support java-plug-in, we converted the applet to run through JNLP and Java Web Start, unfortunately. JNLP is loaded in both browsers, and the client must double-click the file to launch Java Web Start.

Our customers are completely disappointed with this behavior, and I am trying to find a solution to this problem.

+5
source share
1 answer

Possible solutions

1) Change the behavior of the browser to ask the user what to do when he clicks on the JNLP link . The user can then select Open with: Java web start launcher or save file .

edit Works in Firefox but does not work with Chrome: see related error reports 10877 and open problems

2) Provide a script to the user who runs javaws https://example.com/your_application.jnlp

Demo example (link to application taken from Oracle tutorial: Launching 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 fearless, there is a hash solution for Chrome.

  • close Chrome and remember that always make a copy of files modified in the following steps; -)
  • look for chrome.[so|dll] in the Chrome library chrome.[so|dll] jnlp bytes and fix them, for example. jnl-
  • Find the Preferences file in your Chrome user profile directory and change it as ...

.

 "download": { ... "extensions_to_open": "jnlp", ... }, 

The next time you click on a link to a JNLP file, it will open automatically (with an application that is set to open this type of file, usually javaws ).

The property was found after studying the source pref_names.cc . But Chrome sees the jnlp extension as dangerous , so we need to fix the library as well.

+8
source

Source: https://habr.com/ru/post/1246378/


All Articles