Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JNLP Extension does not open in Internet Explorer

I am having an issue of opening *.jnlp extensions using Internet Explorer. The extension opens properly in Chrome and Firefox, leading me to believe it is an issue with IE and possibly the web server/JNLP configuration. Specifically, internet explorer opens the *.jnlp file as an *.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 have tried the following "Fixes"/workarounds to no avail:

  • Run IE as Administrator
  • Adding URL to compatibility view
  • Changing JAVA settings to "Always allow JNLP/MIME"
  • Reset internet explorer advanced settings
  • Change the MIME extension settings in the web.xml file of the web server
  • Change IE setting to always allow file downloads

Update: I was able to fix this issue with the workaround I posted below. However, I am looking for a more permanent fix if anyone has suggestions. Specifically, I am looking for a way to fix this on the business/server side if at all possible. It would be nice if the users didn't need to change any settings on their side (other then switching from IE to a different browser).

MIME-Mapping in web.xml:

  <mime-mapping>
    <extension>jnlp</extension>
    <mime-type>application/x-java-jnlp-file</mime-type>
</mime-mapping>
like image 758
ballBreaker Avatar asked May 12 '15 16:05

ballBreaker


People also ask

Why JNLP file is not opening?

Because JNLP files are program-specific, your computer may not properly recognize JNLP files to execute them using the Java Web Start application. If this happens, you need to modify your computer's file associations so that JNLP files open correctly with the Java Web Start application.

How do I enable JNLP in Windows 10?

Select the 'Security tab', click the [Edit Site List] button, and add https://ecf.ca5.uscourts.gov/ to the Exception Site List. 4. Select the 'Advanced' tab, click the 'Always allow' radio button under JNLP File/MIME Association, and click [OK].

How do I change the default JNLP app?

Click the Programs link. Under Default Programs, click the Make a file type always open in a specific program link. Under the Name column, locate and select JNLP from the list of Extensions. Click the Change program button.


1 Answers

I ended up fixing this problem by changing a specific setting within Internet Explorer.

Tools -> Internet Options -> Security -> Custom Level... -> Miscellaneous -> Enable MIME Sniffing- > Disable

It took me a while to find this fix, so I'm including it here in case anyone else has this issue as well.

PS: This is more of a workaround then a permanent fix. Any additional insight would be helpful.

Update: Ended up adding <%@ page contentType="application/x-java-jnlp-file" %> to the beginning of the JNLP file and then building the war. Essentially the JNLP would automatically launch but give a parsing error. Once this line was then taken out of the JNLP and the WAR was re-built, the JNLP would launch javawebstart and the parsing error was gone (AKA Problem Solved). Don't really know why, but this magic seemed to work.

like image 177
ballBreaker Avatar answered Sep 25 '22 19:09

ballBreaker