java:searchinsideajarfile
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| java:searchinsideajarfile [2012/08/22 12:10] – [Other option] rlunaro | java:searchinsideajarfile [2022/12/02 21:02] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== How to search inside a Jar file ====== | ||
| + | |||
| + | ===== Intro ===== | ||
| + | |||
| + | Sometimes it is useful to detect if a certain class is inside a jar file without the tedious process of rename it to .zip, uncompress and make a search. | ||
| + | |||
| + | It is possible to instruct windows to do the search inside a jar file with a simple change in the registry. | ||
| + | |||
| + | Here are the instructions: | ||
| + | |||
| + | http:// | ||
| + | |||
| + | And, for the sake of not loosing the key data, here are the registry key that must be created. This is the dump of a registry file, so if you just create file called " | ||
| + | |||
| + | **You have to re-login to the computer for make this to work.** | ||
| + | |||
| + | |||
| + | <code registry> | ||
| + | Windows Registry Editor Version 5.00 | ||
| + | |||
| + | [HKEY_CLASSES_ROOT\.jar\PersistentHandler] | ||
| + | @=" | ||
| + | </ | ||
| + | |||
| + | ===== Other option ===== | ||
| + | |||
| + | I've tried the first one and it didn't work, but this one, despite being a command line tool, works very fine: | ||
| + | |||
| + | http:// | ||
| + | |||
| + | I've created a batch file for run it more easily (see below). I've changed the name to grepjar because I am more accustomed to this sintax. | ||
| + | |||
| + | <code bat> | ||
| + | @echo off | ||
| + | |||
| + | rem grepjar.bat - wrapper for jarscan.jar file | ||
| + | |||
| + | set " | ||
| + | |||
| + | if " | ||
| + | |||
| + | java -jar " | ||
| + | |||
| + | goto exit | ||
| + | |||
| + | :help | ||
| + | |||
| + | echo Usage: grepjar directory class-to-search | ||
| + | |||
| + | :exit | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ~~DISQUS~~ | ||
| + | |||
| + | |||
| + | |||
