When I'm looking for applications using Spotlight, the top entries are often JAR files. This is annoying. Is it possible to change Spotlight so that JAR files are not considered applications?
|
|
I would like to do the same, but I think the answer is "it's not possible" or at least "it'd be risky to attempt". Here's what I've discovered so far. Associate JAR files to some other application?I started by assuming Spotlight is inferring that JAR files are kind:application because JAR files are associated with Jar Launcher.app by default. Perhaps if we can remove that association then Spotlight will stop indexing JAR files as apps. This can be done the standard way in Finder. View a JAR file in Finder, view info, select a different application under "Open With", click "Change All". I tried this and had no change in Spotlight results, however I didn't try rebuilding my Spotlight index. I don't like this as I don't want Archive Utility associated with JAR files, nor do I have another application I'd rather associate. That led me to... Remove association for JAR files with Jar Launcher?This article purports to tell you how to remove a file association. It's only partly correct. It works to remove an association you previously added manually. Turns out it's no good for removing an association that comes from the system. I tried the referenced application, [RCDefaultApp][], which the article says can disable any association. Turns out the app just uses a kludge/workaround. It "disables" file associations by creating a new association to a dummy application, not by removing the actual association. This is no different than creating your own do-nothing application and associating it with .jar files.
Where is Jar Launcher.app associated with JAR files?A few of these articles reference the
And you'll get a big dump of Launch Services' configurations. Including these relevant parts:
Which for me says a few things:
I'm really uncomfortable mucking around with /System/Library/CoreServices/CoreTypes.bundle, but it would appear that's what is necessary to change the "Java archive" type, removing "public.executable" from "conforms to". I'd put my money that that's what Spotlight is using when indexing JAR files and treating them as kind:application. As a Java developer, you know that not all JAR files are applications. A more sophisticated indexer could examine the manifest inside the JAR. But that would only fix Spotlight. Arguably it's an OS X bug that Finder treats all JAR files as applications, allowing you to Command-O them and attempting to run them via Jar Launcher. Without knowing more about Launch Services, that seems like a limitation of the file extension centric mechanism at work here. Bummer. |
||||
|
|
Jar files often comes from reduced set of directories. In my case, most jar files was in "/Applications/Eclipse/plugins". So, in System Preferences > Spotlight > Privacy, I've just prevented Spotlight from searching into this particular location. Now, it works like a charm :) |
|||
|
|
|
I think you've to filter searching in spotlight. System Preferences >> Spotlight , at search result, drop mark for "Application". hope this works. I kindly want to advise to use Google Quick Search Box . it allows you to search data on your computer and across the web. I think it's more powerful than spotlight. |
|||||
|