Doug's Compendium of Stuff


Stuff

Main
Where Is Doug?
My Bookmarks
My Resume
Pacbell Outages
Pilot Logbook

Code

Tournament
Jar Search
DCT6200 Firewire Tuner (For Motorola DCT6200 set top box and Freevo)
Serial Port Tuner (For Motorola DCT2XXX set top box and Freevo)
Gentoo IVTV Ebuild
Java Internet Jukebox

Old

2008: 08 07 03 02
2007: 12 08 07
2006: 12 06 02
2005: 11 10 07 06 05 04
2004: 07 06
2003: 10 08 07 05 04

Offsite

My Wife
My Work

Contact

Email:



The Few, The Proud, The Pradipta 416


Jar Search

Frustrated by all the time wasted expanding and repacking J2EE enterprise application archives (ear files) looking for bean classes and the like, I wrote this small tool for searching an archive recursively for files whose paths match a regular expression.

Here's a sample use:

$ java -jar jarsearch.jar -a CMRouter New_Project.ear
Searching for 'CMRouter' ...
There are 3 matches:
New_Project.ear>New_Project.jar>frameworkImpl/model/router/CMRouterBean.class
New_Project.ear>New_Project.jar>frameworkImpl/model/router/CMRouterLocal.class
New_Project.ear>New_Project.jar>frameworkImpl/model/router/CMRouterLocalHome.class

It consists of one class, which may be viewed here. To compile it, you will need the gnu.regexp package.

Download it here: gzipped tar archive (33K)

The above archive contains an ant based project with full source. You are welcome to use this code as you see fit. Just untar the archive and run "ant dist" to produce jarsearch.jar in the project directory.

Locations of visitors to this page