views:

3330

answers:

6

I believe back when we were on Win2K, Windows Search would search through Jar files to locate specific classes but this doesn't appear to work in XP. Does anyone know how to enable this in XP?

Note, to do the search in Win2K we just entered *.jar for the files and "ClassABC" for the search text string and the search would return any jar files containing class files where the title contained "ClassABC".

+1  A: 

If it was removed it was likely due to the Sun-Microsoft Java dispute that was going on around the time XP was developed. It's unlikely to have a way of re-enabling it.

You might find this helpful instead: http://jarbrowser.sourceforge.net/

SpliFF
Interesting. I thought there might be a registry entry to enable it.
Marcus
see my post below...works for me
curtisk
+2  A: 

I would also recommend total commander. It is a great file management tool with great search functionality which can easily look inside jar files.

neesh
I've started trying Agent Ransack which seems similar.
Marcus
+1  A: 

According to this MSDN Channel 9 article, adding an appropriate IFilter will do it. Since .jar files are the same as .zip files, one of the four ZIP file IFilters they list might work (unless they are all extension-based).

Michael Myers
+2  A: 

Add this to a text file, save file, change the extension to .reg, double click to add to registry and you should be ok...you can search on file name or content and it should show jars that have class names

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.jar\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

The only thing left is to logout and log back into windows and it should work fine for you, see http://support.microsoft.com/kb/309173 for more details

curtisk
What does it do?
Michael Myers
http://support.microsoft.com/kb/309173
curtisk
huh...there was more there than the link above in my response...but anyways...you're just tagging the extension with the plain text filter
curtisk
Worked - thanks!
Marcus
+1  A: 

From Brenden Anstey's Blog:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.jar]
"Content Type"="application/x-zip-compressed"
"PerceivedType"="compressed"
@="CompressedFolder"

[HKEY_CLASSES_ROOT\.jar\CompressedFolder]

[HKEY_CLASSES_ROOT\.jar\CompressedFolder\ShellNew]
"Data"=hex:50,4b,05,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

[HKEY_CLASSES_ROOT\.jar\OpenWithProgids]
"CompressedFolder"=""

[HKEY_CLASSES_ROOT\.jar\PersistentHandler]
@="{098f2470-bae0-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\.war]
"Content Type"="application/x-zip-compressed"
"PerceivedType"="compressed"
@="CompressedFolder"

[HKEY_CLASSES_ROOT\.war\CompressedFolder]

[HKEY_CLASSES_ROOT\.war\CompressedFolder\ShellNew]
"Data"=hex:50,4b,05,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

[HKEY_CLASSES_ROOT\.war\OpenWithProgids]
"CompressedFolder"=""

[HKEY_CLASSES_ROOT\.war\PersistentHandler]
@="{098f2470-bae0-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\.ear]
"Content Type"="application/x-zip-compressed"
"PerceivedType"="compressed"
@="CompressedFolder"

[HKEY_CLASSES_ROOT\.ear\CompressedFolder]

[HKEY_CLASSES_ROOT\.ear\CompressedFolder\ShellNew]
"Data"=hex:50,4b,05,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

[HKEY_CLASSES_ROOT\.ear\OpenWithProgids]
"CompressedFolder"=""

[HKEY_CLASSES_ROOT\.ear\PersistentHandler]
@="{098f2470-bae0-11cd-b579-08002b30bfeb}"
mtpettyp
A: 

I know that it's not Windows Search, but I have long used Agent Ransack for this: it is very quick and searches through all the various java archive formats (jar, war, ear) as well as zip.

A feature that I particularly like and use a lot is saving a search: you can save the criteria (so that you can repeat that search easily) or the results.. So when I am working on a project, I will often want to search through the project directory tree for a file (or a file within a jar/zip). I perform the search once and save the criteria as a .srf file, which I can open quickly to perform similar searches afterwards.

Robert Mark Bram