I like to use this one-liner: bash$ for f in `find . -name \*.jar`; do ( jar tvf "$f" | grep -q com.myclass.Name ) && echo $f; done
Luis On May 7, 3:08 am, tachoknight <[email protected]> wrote: > Hi all- > > Okay, I've had it. I wrote some web service code to be deployed in a > JBoss 4 AS which works great. Writing the code wasn't really hard, but > figuring out which Jar provided by JBoss was; it was a lot of trial > and error by determining from the filename of the jar. Finally I got > my ant script to work and it built fine. Deploying wasn't an issue > because I knew JBoss had all the jars it needed. > > Now I've upgraded my development JBoss instance to version 5, and, > surprise! The jar files are, for the most part, different. My ant > script won't work because it's looking for jars that simply aren't > there anymore. > > I know JBoss hasn't done much more than re-arrange the code, but it > leaves me frustrated that it seems like there's no way to tell what a > jar provides other than going through them, one by one, and doing a > jar tvf on the file and pouring through the output to see if it has > the classes I need. > > Is there some sort of tool or way to say "look, I know what you need > is in this directory somewhere. Find it yourself". Of course I'm not > expecting javac to do that, but some sort of Java equivalent of ldd > that could analyze the imports and find them? I'm not even suggesting > deducing it from the code; just tell me what jar contains > javax.ejb.Stateless, etc. > > Thanks for any info, > > Tacho --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
