On Thu, 8 Oct 2009 07:12:09 -0700 (PDT), laredotornado
<> wrote, quoted or indirectly quoted someone
who said :
>
>I'm using Mac OS X (bash shell) with Java 1.5. I have an enum class
>and I think an old version is drifting around in a JAR file somewhere
>that contains a field, "MATCH_999". Does anyone know how to search
>through the JAR files to find the JAR(s) that may contain this? I
>would prefer not to unzip each one.
I would do it on Windows by Winzip unpack then scan with Funduc
Search/Replace.
To do it with code you could use the Zip class to scan the jar, and
just read each class file as a string of bytes, then look for that
byte string (utf-8 encoding).
For a more general solution, you could decode the class file.
See
http://mindprod.com/jgloss/javaclassformat.html
and follow the links for tools.
--
Roedy Green Canadian Mind Products
http://mindprod.com
I advocate that super programmers who can juggle vastly more complex balls than average guys can, should be banned, by management, from dragging the average crowd into system complexity zones where the whole team will start to drown.
~ Jan V.