2

How Chrome launches JNLP files is different from how other browsers handle it. Chrome treats that as a download rather than application file where the application needs to be launched to handle it.

So the JNLP file gets downloaded - Chrome asks if you want to keep or discard it & you have keep it & then click on it to the launch the JNLP application.

Oracle has advised people to move from Applets to JNLP.

However, this behaviour of Chrome makes it very difficult to migrate Applets to JNLP except in controlled environments. If you have a site with lots of users you aren't in control of - many of them will not download a file & click on it to run it.

OTOH, an applet would launch after you click on "You sure you want to run this applet" kind of dialogs.

Is there a way to make this migration from Applets to JNLP smoother?

EDIT: Things have changed between the time Launch webstart without downloading...? was asked and answered. There was a workaround then (described in the accepted answer) - this worked is no longer applicable now because Chrome no longer runs applets.

Community
  • 1
  • 1
user93353
  • 13,733
  • 8
  • 60
  • 122
  • 2
    Possible duplicate of [Launch webstart without downloading...?](http://stackoverflow.com/questions/11679373/launch-webstart-without-downloading) – Laszlo Hirdi Jun 23 '16 at 08:40
  • @LaszloHirdi - that Question is not relevant today because the accepted answer talks about using Applets as a solution - Chrome has now deprecated applets – user93353 Jun 23 '16 at 09:21
  • The accepted answer of the referenced duplicate issue is the decision of the questioner of that question and that is probably not applicable in your case. However from technical point of view I see these questions are the same. – Laszlo Hirdi Jun 23 '16 at 11:23

1 Answers1

3

The chrome problem you mention with the JNLP is a known chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=10877

Despite this ticket is marked as Fixed, it is not fixed in real. I still get this problem with my version: 51.0.2704.103 m

Among the comments of the chrome ticket you can find some workaround hints which might work in some environments but not in general.

What you can do:

  1. As a workaround you can suggest other browsers for your customers: Firefox, Internet Explorer to work with JNLP applications. (This is what we do in general.)

  2. You do not need any browser in general to start a JNLP application. Browsers also delegate this to the JRE javaws. So you can create a command line with your JNLP URL and you can put in into a script file. If you link that script to an icon you can start the JNLP application with one click.

%JAVA_HOME%\bin\javaws http://my/url/myapp.jnlp

  1. It is similar to 2. but you need to start the JNLP application once 1st in another way. In the JNLP (xml) file there is a section which you can fill to have an icon created after the 1st start.

    <shortcut online="true">
      <desktop/>
      <menu submenu="Start MyApp"/>
    </shortcut>    
    

In windows it will be created under: Start/All Programs/Start MyApp menu

Laszlo Hirdi
  • 1,140
  • 12
  • 18
  • Thank you. The bug is 7 years old and Chrome hasn't fixed it. Does Chrome have any forum or anything where we can inquire if Google has any intention of fixing it. – user93353 Jun 23 '16 at 09:19
  • This is a Webapplication for me. The JNLP file is dynamically generated differently each time. So the work arounds won't work for me. – user93353 Jun 23 '16 at 09:20
  • You can ask chrome questions from google customer support here: https://productforums.google.com/forum/#!forum/chrome – Laszlo Hirdi Jun 23 '16 at 11:45