Version: (using KDE 4.3.1) Installed from: Ubuntu Packages kde reports on the properties of jar files that they are zip archives, it actually reports the file as a generic *.zip archive. There is *.jar rule in the system settings which points that those files should be treated as java execs but it is not followed. In fact there isn't even an "open with" pointing to java in the right click menu for the jar files.
Hmm. It's Sun's fault :-) packages/sun-java5-jre.xml defines <mime-type type="application/java-archive"> <comment>Java Archive</comment> <glob pattern="*.jar"/> </mime-type> while packages/freedesktop.org.xml defines <mime-type type="application/x-java-archive"> with the same glob *.jar Which makes *.jar conflicting, and then only sniffing (determination from the contents) can be used to disambiguate it. I'll check why the sniffing doesn't work, and why sun-java5-jre redefines the mimetype.....
Workaround for now: as root, remove /usr/share/mime/packages/sun-java*-jre.xml and run update-mime-database /usr/share/mime.
It's a debian/ubuntu packaging bug rather than a Sun bug, in fact. https://bugs.launchpad.net/ubuntu/+source/krusader/+bug/309778
Thanks, the workaround worked. My question is though, as you marked it as resolved and reading your comments, shouldn't the KDE desktop have it's own rules that "disobey" those at mime/packages and only use them as reference? I mean from my system settings I had already removed the duplicate entry and still didn't read it right..
We won't include a workaround in KDE, that would be a bit dirty when the right fix is upstream (I just added the missing alias to shared-mime-info btw). But I think you mean "disabling a mimetype as a user". That's another story ;-) You tried removing the *.jar mimetype from one of the mimetypes? If you don't have shared-mime-info from CVS this won't work (try reopening that mimetype, you'll see that the glob is back). https://bugs.kde.org/show_bug.cgi?id=203706 I ping'ed Bastien yesterday to ask for a shared-mime-info release so that this finally works for everyone.
*** Bug 458520 has been marked as a duplicate of this bug. ***
This is still an issue in openSUSE Tumbleweed 20221127. Is it still accurate that this is a packaging issue? And if so, wouldn't it make sense to include the workaround in KDE since several distros seem to have this problem? alexander@PC:/usr/share/mime> find . -name "*java*" ./text/x-java.xml ./application/x-java-archive.xml ./application/x-java-jce-keystore.xml ./application/x-java.xml ./application/x-java-pack200.xml ./application/javascript.xml ./application/x-java-jnlp-file.xml ./application/x-java-applet.xml ./application/x-java-keystore.xml ./video/x-javafx.xml alexander@PC:/usr/share/mime> grep -r "\.jar" * application/x-java-archive.xml: <glob pattern="*.jar"/> globs:application/x-java-archive:*.jar globs2:50:application/x-java-archive:*.jar packages/freedesktop.org.xml: <glob pattern="*.jar"/> Contents of /usr/share/mime/application/x-java-archive.xml and packages/freedesktop.org.xml: [...] <sub-class-of type="application/zip"/> <generic-icon name="package-x-generic"/> <alias type="application/x-jar"/> <alias type="application/java-archive"/> <glob pattern="*.jar"/> [...]
Downstream bug report: https://bugzilla.opensuse.org/show_bug.cgi?id=1205825