I want to use JDepend
and see how we can identify the libraries directly used in an application
And want to Write a sample application to identify the libraries used in my application. How it can be achieved.
I read article http://clarkware.com/software/JDepend.html, but I need still better knowledge to accomplish this task. Please any one can guide me better reference that I can use.
Asked
Active
Viewed 734 times
0

user2215139
- 1,805
- 2
- 18
- 24
1 Answers
0
From what I can understand from the JDepend page, it provides with quality metrics which are numerical values indicating quality of a given package. May be it is useful to measure the quality of a library but not helpful in identifying the libraries used in the application.
Since the import statements in the code will have the reference to the classes in the libraries, parsing the application code and processing the import statements might help.

quirkystack
- 1,387
- 2
- 17
- 42
-
1You can parse the java code files as text files and use [regular expressions](http://www.vogella.com/articles/JavaRegularExpressions/article.html). Any import statement which starts with something other than "java." or "javax." could be taken as an external library – quirkystack Jun 11 '13 at 05:04
-
parsing the code and the imports might not give the accurate library names. Instead , I could think of this naive approach of going through the directory and finding the names of jar files. Don't know if this is what you are looking for. If you need the code here is the [link](http://pastebin.com/uhjeFWjT) – quirkystack Jun 11 '13 at 06:14