Hi Janek,
Looks good - quite often I just use 'unzip -l <jarfile>' on the jar files to
list their contents as well, as it's faster than the 'jar' version that
comes with the JDK.
Cheers,
Marcus
On Fri, Feb 06, 2004 at 01:56:57AM +1100, Janek Bogucki wrote:
> On Wed, 2004-02-04 at 16:37, Voyer Henry wrote:
> > Thanks
> >
>
> Below is bash script I wrote to help me locate classes in jars. If I cd
> to the tomcat home dir this is what I get
>
> [EMAIL PROTECTED] tomcat4]$ findinjar.sh DateFormat
>
> javax/mail/internet/MailDateFormat.class
> found in ./common/lib/[javamail][mailapi].jar
> org/apache/jasper/util/FastDateFormat.class
> found in ./common/lib/jasper-runtime.jar
> org/apache/catalina/util/FastHttpDateFormat.class
> org/apache/catalina/util/FastDateFormat.class
> found in ./server/lib/catalina.jar
> org/apache/tomcat/util/http/FastHttpDateFormat.class
> found in ./server/lib/tomcat-util.jar
> org/apache/commons/lang/time/FastDateFormat.class
> org/apache/commons/lang/time/FastDateFormat$UnpaddedMonthField.class
> org/apache/commons/lang/time/FastDateFormat$StringLiteral.class
> org/apache/commons/lang/time/FastDateFormat$TwelveHourField.class
> org/apache/commons/lang/time/FastDateFormat$NumberRule.class
> org/apache/commons/lang/time/FastDateFormat$CharacterLiteral.class
> org/apache/commons/lang/time/FastDateFormat$TimeZoneNumberRule.class
> org/apache/commons/lang/time/FastDateFormat$TimeZoneNameRule.class
> org/apache/commons/lang/time/DateFormatUtils.class
> org/apache/commons/lang/time/FastDateFormat$TwoDigitMonthField.class
> org/apache/commons/lang/time/FastDateFormat$TimeZoneDisplayKey.class
> org/apache/commons/lang/time/FastDateFormat$UnpaddedNumberField.class
> org/apache/commons/lang/time/FastDateFormat$PaddedNumberField.class
> org/apache/commons/lang/time/FastDateFormat$TwentyFourHourField.class
> org/apache/commons/lang/time/FastDateFormat$Rule.class
> org/apache/commons/lang/time/FastDateFormat$TwoDigitNumberField.class
> org/apache/commons/lang/time/FastDateFormat$TextField.class
> org/apache/commons/lang/time/FastDateFormat$Pair.class
> org/apache/commons/lang/time/FastDateFormat$TwoDigitYearField.class
> found in ./shared/lib/commons-lang.jar
> org/apache/log4j/helpers/AbsoluteTimeDateFormat.class
> org/apache/log4j/helpers/DateTimeDateFormat.class
> org/apache/log4j/helpers/ISO8601DateFormat.class
> org/apache/log4j/helpers/RelativeTimeDateFormat.class
> found in ./shared/lib/log4j.jar
> [EMAIL PROTECTED] tomcat4]$
>
>
> #!/bin/sh
> #
> # findinjar.sh
> #
> # Author: Janek D. Bogucki, 01-Oct-31
> #
> # grep for a string in all JARs in the current directory
> # recursively.
>
> if [ $# -ne 1 ]; then
> echo "Usage: $0 <String>"
> fi
>
> for jar in $(find . -name '*.jar'); do
>
> if jar tf $jar | grep $1 ; then
>
> echo " found in $jar"
>
> fi
>
> done
>
>
> -Janek
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
.....
,,$$$$$$$$$, Marcus Crafter
;$' '$$$$: Computer Systems Engineer
$: $$$$: ManageSoft Corporation
$ o_)$$$: Melbourne Australia
;$, _/\ &&:'
' /( &&&
\_&&&&'
&&&&.
&&&&&&&:
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]