Sounds like a lot of us have the same tool. I have mine setup as a command
call sjar where I pass the text I am looking for. It then greps the output
of the jar tvf command and outputs what it finds.

On Thu, May 7, 2009 at 10:37 AM, Alexey <[email protected]> wrote:

>
> I wrote a tool that does just this.  I've been meaning to post it on
> SourceForge, but if you're interested, I can send you a copy
> directly.  It can work off its own classpath, plus whatever other
> places you give it to search in and it spits out whereever it finds
> the resource name you give it (doesn't have to be a class name, so
> java.lang.String is resource java/lang/String.class, plus you can
> search for partial resource names, such as java/lang/).  Sort of like
> "which -a" for Java.
>
> On May 6, 10:08 pm, 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
> >
>


-- 
Robert Casto
www.robertcasto.com
[email protected]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to