Tacho,

I figured you might want to check out the tool I mentioned before I get done 
putting it up on SourceForge.  See attached.  You can run it in GUI mode and 
add class path elements in the large textbox under the search field or specify 
a classpath the regular way and run it in command line mode:

$ java -cp jrf.jar zinger.jrf.JavaResourceFinder
jrf> java/lang/String.class
jar:file:/C:/Program%20Files/Java/jre6/lib/rt.jar!/java/lang/String.class
jrf> zinger/jrf/JavaResourceFinder.class
jar:file:/C:/pub/ybriefcase/code/jrf.jar!/zinger/jrf/JavaResourceFinder.class
jrf>

Enter a blank resource name to quit.

Alexey
2001 Honda CBR600F4i (CCS)
1992 Kawasaki EX500
http://azinger.blogspot.com
http://bsheet.sourceforge.net
http://wcollage.sourceforge.net


--- On Wed, 5/6/09, tachoknight <[email protected]> wrote:
From: tachoknight <[email protected]>
Subject: [The Java Posse] How do you know what Jar provides what?
To: "The Java Posse" <[email protected]>
Date: Wednesday, May 6, 2009, 10:08 PM

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

Attachment: jrf.jar
Description: application/java

Reply via email to