Bug 7852 - Java Archive (.jar) is incorrect.
Summary: Java Archive (.jar) is incorrect.
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: All All
: highest normal
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-11 14:47 UTC by Joseph Kowalski
Modified: 2006-08-25 07:25 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Joseph Kowalski 2006-08-11 14:47:15 UTC
There are two problems with the entry for Java Archive (.jar files).

First, the mime-type is incorrectly named.  The mime-type was specified many
years ago as x-java-archive. See:
  http://java.sun.com/products/javawebstart/1.2/docs/downloadservletguide.html
The freedesktop.org.xml file somehow has contrived the x-jar mimetype.

I don't know of a mechanism in the mime mechanism to do a form of compatibility.
Perhaps there is some form of alias mechanism where the preferred mime type is
used to look for a registered application and if that fails the aliases are
tried in order.

I'm setting the priority as P1 as it seems that the longer this goes unaddressed
the greater the impact of change will be.  Of course, this may be adjusted by
the responsible engineer.

The second problem is that without a suffix, the current entry can't tell a .jar
file from a .zip file.  The following proposed entry (with i18n entries not
included) would address that issue.

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="application/x-java-archive">
    <comment>Java Archive</comment>
    <glob pattern="*.jar"/>
    <magic priority="85">
      <match type="string" value="PK\003\004" offset="0">
        match type="host16" value="0xcafe" offset="40" />
      </match>
    </magic>
  </mime-type>
</mime-info>
Comment 1 Bastien Nocera 2006-08-25 07:25:57 UTC
2006-08-25  Bastien Nocera  <hadess@hadess.net>

        * Makefile.am: add "check" to the default target when compiling from
        CVS
        * freedesktop.org.xml.in: Change application/x-jar to the SUN-
        recommended application/x-java-archive, add an alias for the former,
        Add better conditional magic to tell zip files and .jars apart,
        Thanks to Joseph Kowalski <jek3@eng.sun.com> for his detailed report
        (Closes: #7852)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.