how to find jar file dependencies

V

vk02720

Given a jar file xyz.jar and a directory containing all other .jar
files, how do I find out the dependent jar files of xyz.jar ?

TIA.
 
R

Robert Mark Bram

Given a jar file xyz.jar and a directory containing all other .jar
files, how do I find out the dependent jar files of xyz.jar ?

Nice question!

One way is to look at the manifest file in the jar. Manifest files can
be written with a "Class-Path" attribute that lists other resources
(jars, class files) that the jar file expects to have in the same
directory (or subdirectory etc, specified by a URL relative to the jar
file).
http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html

Another way is just to compile something that uses the jar you want -
you will find out from the error messages (if anything) if there are
external resources that cannot be found.

Rob
:)
 
Joined
Mar 12, 2014
Messages
1
Reaction score
0
try findmaven.net, enter the jar name to find out the jar then click the dependency button to show the dependency tree of the jar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top