views:

130

answers:

2

Using windows server, I have a path to a file that, when you click the button, executes the jar file and runs the program. At least in firefox. The problem occurs with IE6. It takes my file.jar and turns it into file.zip. Any suggestions here?

A: 

Firefox can determine correct mime-type by extension first, and check header information to find out if there's a congruent match. IE6 unfortunately doesn't.

JAR file is actually is a ZIP file (rename a JAR file to zip and it'll be opened easily with Winzip) change the JAR mime-type to "application/java-archive".

Update
On IIS:

  1. Select the site to configure in IIS, right click and select "Properties"
  2. Under HTTP Headers Tab, select "File Types" under the MIME Map section and select "New Type"
  3. Type ".jar" as the associated extension and "application/java-archive" as the content type.
  4. Select "OK" and you're ready to go!
  5. Restart IIS.
The Elite Gentleman
ok thanks that should be all I need. I'm kind of disappointed this guy couldn't figure it out haha. Seems pretty simple. However SO pulls through yet again =)
Sean Martin
A: 

You need to have an administrator set it in IIS on your web server, so that files served with the .jar extension use the "application/java-archive" mime-type.

In IIS6, right-click on the web site and choose "Properties". Go to the "HTTP Headers" tab, and in the bottom you'll see a section called "MIME Map". Click on the button "File Types" and add the following two types:

Extension: jar
Content-type: application/java-archive

In IIS7, you will see an icon called Mime-Types and click on that and then use the "Add" to add a new type.

Turnkey