JNLP extension does not open in Internet Explorer

I am having trouble opening * .jnlp extensions using Internet Explorer. The extension opens properly in Chrome and Firefox, which allows me to assume that this is a problem with IE and possibly with setting up the web server / JNLP. In particular, Internet explorer opens the * .jnlp file as a * .xml script instead of downloading the file or opening it with java web start.

Example:

<?xml version="1.0" encoding="utf-8" ?> - <!-- JNLP File for Downtime Registration Application --> - <jnlp spec="1.7+" codebase="http://foo:8080/bar" href="bar.jnlp"> - <information> <title>FOO</title> <vendor>FOO Inc.</vendor> <description>FOO BAR System</description> - <shortcut online="false"> <desktop /> <menu submenu="FOO" /> </shortcut> </information> - <security> <all-permissions /> </security> - <resources> <j2se version="1.7+" java-vm-args="-client" /> ... </resources> <application-desc main-class="FooBarMainApp" /> </jnlp> 

I tried the following β€œfixes” / workarounds to no avail:

  • Run IE as Administrator
  • Adding URLs to Compatibility Mode
  • Changing JAVA settings to "Always allow JNLP / MIME"
  • Reset Advanced Internet Explorer Settings
  • Change the settings for the MIME extension in the web.xml file of the web server.
  • Change IE setting to always allow file downloads

Update: I was able to fix this problem with a workaround that I posted below. However, I am looking for a more permanent solution if anyone has any suggestions. In particular, I am looking for a way to fix this on the business / server side, if at all possible. It would be nice if users did not need to change any settings on their side (otherwise, switching from IE to another browser).

MIME-Mapping in web.xml:

  <mime-mapping> <extension>jnlp</extension> <mime-type>application/x-java-jnlp-file</mime-type> </mime-mapping> 
+6
source share
3 answers

I decided to fix this problem by changing the settings in Internet Explorer.

Tools β†’ Internet Options β†’ Security β†’ User Level ... β†’ Miscellaneous β†’ Enable MIME Sniffing-> Disable

It took me a while to find this fix, so I will include it here if anyone else has this problem.

PS: This is more of a workaround than a permanent fix. Any further insights would be helpful.

Update : the completion of adding <% @page contentType = "application / x-java-jnlp-file"%> to the top of the JNLP file, and then building the war. Essentially, JNLP starts automatically, but gives a parsing error. After this line was pulled out of JNLP and WAR was rebuilt, JNLP launched javawebstart and the parsing error went away (AKA problem was resolved). I don't know why, but this magic seemed to work.

+8
source

I save the JWS application from EAR / WAR along with all the signed libraries.

If the JWS application is hosted on an Apache web server, you can add this type in httpd.conf as follows:

 AddType application/x-java-jnlp-file .jnlp 

Link here: http://httpd.apache.org/docs/current/mod/mod_mime.html

0
source

JNLP problem can be fixed by following these steps:

  • Open Mozilla Firefox, and then download the JNLP extension. Mozilla asked me how to open it, I chose Open with javaws (in C:\Program Files\Java\jre1.8.0_161\lib ).
  • Choose this option from now on.

I tried to open it in Internet Explorer, and it worked automatically.

Or from the Dowloaded file, right-click the JNLP extension file, open it with javaws (in C:\Program Files\Java\jre1.8.0_161\lib ). I have not tried this, but I think it should work.

0
source

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


All Articles