permaculture playing cards*
The moose likes Beginning Java and the fly likes Dependency tool: java->jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Dependency tool: java->jar" Watch "Dependency tool: java->jar" New topic
Author

Dependency tool: java->jar

surlac surlacovich
Ranch Hand

Joined: Mar 12, 2013
Posts: 296

I have a bunch of classes in the project. Each class depend on subset of jars.
Is there any tool that shows which class depend on which jar, and vice-versa?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10175
    
    8

Havent tried integrating with eclipse (so don't know if this will work for your custom jars), but check out http://www.findjar.com/index.x


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
surlac surlacovich
Ranch Hand

Joined: Mar 12, 2013
Posts: 296

Are you serious? This is an online service to find jar-files by class-names, where the jar files goes through process of moderation to be included in the search. So you suggest to pack my project in to jar, send to findjar.com and wait while they reviewing and maybe accepting my jar?
I believe there should be more convenient tools (even offline) to analyze dependencies.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10175
    
    8

surlac surlacovich wrote:Are you serious? This is an online service to find jar-files by class-names, where the jar files goes through process of moderation to be included in the search. So you suggest to pack my project in to jar, send to findjar.com and wait while they reviewing and maybe accepting my jar?
I believe there should be more convenient tools (even offline) to analyze dependencies.

No need to get your knickers up in a knot. After all I did say
Maneesh Godbole wrote:(so don't know if this will work for your custom jars


I don't know what IDE you use, but in Eclipse if I open a type (Ctrl+Shift+T) , eclipse highlights the relevant jar for me in the package explorer view.
surlac surlacovich
Ranch Hand

Joined: Mar 12, 2013
Posts: 296

Maneesh Godbole wrote:
I don't know what IDE you use, but in Eclipse if I open a type (Ctrl+Shift+T) , eclipse highlights the relevant jar for me in the package explorer view.

It's a different thing. Maybe I wasn't correct in formulating the question. But when you ctrl+shift+t of type, it shows the jar where the class located, NOT the jars the class depends on.
For example, I have class MyClass, it uses Logger from slf4j and Joda library.
I expect the tool to show me:



P.S. I use both IntelliJ IDEA and Eclipse. The plugin for any of them will work for me.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10175
    
    8

Ok looks like I misunderstood your question. I got the impression you wanted to find out the jar containing the class.
surlac surlacovich
Ranch Hand

Joined: Mar 12, 2013
Posts: 296

Maneesh Godbole wrote:I got the impression you wanted to find out the jar containing the class.

That one can be solved by searching with almost any file-manager.

The closest solution of my problem is:

which shows jar-dependencies for Maven-based project. Is there any similar tool for *.java file (instead of pom.xml)?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dependency tool: java->jar
 
Similar Threads
How to find the jar file which contains a certain class.
Any Dependency Tool
Tools for analysing JEE application
Websphere 6.1 - Unable to recogize jar's in EAR
Use of interface