Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer > Re: How to find...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 916 of 1040
Post > Topic >>

Re: How to find a class file in jar files?

by "Harry van Stedum" <hvstedum@[EMAIL PROTECTED] > Jan 5, 2007 at 03:27 AM

laredotornado@[EMAIL PROTECTED]
 wrote:
> Hi,
>
> I'm SSH'ed in to a Mac OS X server through PuTTY client running on a
> Windows XP machine.  I am trying to find a file "Servlet.class" that is
> in a .jar file, but I don't know which one.  Given a parent directory,
> /cl*****, that contains JARS at many different subdirectory levels, is
> there a command I can use to search for "Servlet.class" amidst all the
> jars?  This must be a command I can run from the Unix-like console, as
> I can't access the Desktop directly.  I'd prefer not to have to unzip
> each one and run "find".

find cl***** -name "*.jar" -exec jar tvf {} \; |grep "Servlet\.class"

should get you started.
I'm not sure of a way to prepend the currently found jarfile, otherwise
you could

find cl***** -name "*.jar" -print -exec jar tvf {} \; > out_file

and then search out_file for Servlet.class, then upwards to find the
jarfile it's in.
 




 3 Posts in Topic:
How to find a class file in jar files?
laredotornado@[EMAIL PROT  2007-01-02 07:28:42 
Re: How to find a class file in jar files?
"Harry van Stedum&qu  2007-01-05 03:27:23 
Re: How to find a class file in jar files?
John W <jon@[EMAIL PRO  2007-01-09 19:54:09 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 6:57:15 CST 2008.