Ketan's Musings

Where he blogs about his eclipse musings

Archive for the ‘jar-finder’ tag

Finding a Class in a ton of jars

with 2 comments

This is how I do it. Create a script I call it findclass in some location on the path. /usr/local/bin is a good place, I prefer $HOME/bin. Remember to chmod this script to 755.

#!/bin/bash
find -iname "*.jar" | xargs -i unzip -l {} | less

In case you are new to less, here’s how you navigate:
1. To find a particular class say com.xyz.abc.MyClass, you type:

/com.xyz.abc.MyClass

2. To find what jar contains this class, you type:

?Archive:

Written by Ketan

July 26th, 2007 at 9:16 am

Posted in GNU & Linux,Java

Tagged with , , ,