Take a peek inside .jar files!

jar tf is a very useful command if we just want to peek into a jar. For example, I had a recent requirement of scanning several jars to look for Hibernate *.cfg.xml files. Naturally, it would have been tedious had I had to open each jar to check. The following simple script (using jar tf) came to the rescue.

for f in `find . -name '*.jar'`;do echo --$f--;jar tf $f | grep -n cfg.xml;done

Terminal within Eclipse

Every now and then I had this urge to have a tool which would save me from switching over to Terminal from Eclipse and vice-versa. A nifty little Eclipse plugin called elt came to the rescue!

elt

elt gives me the flexibility to execute frequently used console commands — thus saving me a lot of finger twitches. 😉

A good introduction is provided here.