简体   繁体   中英

IE6 turns jar into zip

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?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM