My command got munged, note that the 3 lines starting with "rm",
"\*.jar" and ">> jar_classes.out" should be on the same line with no
embedded newlines.

On May 7, 10:27 am, Ed G <[email protected]> wrote:
> I have had the same problem with WebLogic's 100's of jars, so I have
> run this shell command that will work in Unix or cygwin (note that
> those are backticks around find and basename, and double-quotes in the
> sed command):
>
> rm -f jar_classes.out; for j in `find [server install directory] -name
> \*.jar`; do echo $j; j1=`basename $j`; jar -tvf $x|sed "s/^/"$j1": /"
>
> >> jar_classes.out; done
>
> Then, just do a "grep -i [classname] jar_classes.out" to find out what
> jar file a class is in.
>
> HTH,
> -ed
>
> 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
--~--~---------~--~----~------------~-------~--~----~
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