0

I write a Java program that needs to use the functionality of jdeps. I can call it as a process and parse the command line output, but as jdeps is a Java tool, I would prefer to use Java methods instead.

Does the JRE/JDK offer these jar/class analysing methods?

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
  • What kind of dependency analysis do you need and what options are you looking for? Could you add an example to make it clear? Also, does the ToolProvider API in Java9 not solve your use case? Sample :- `Optional javac = ToolProvider.findFirst("jdeps"); int javacRun = javac.get().run( System.out, System.err, "--help" );` – Naman Apr 18 '18 at 10:31
  • I should have said that I need a Java 8 solution. I am looking for a list of external classes that are used by the classes of the jar (which you get by `jdeps -v` – J Fabian Meier Apr 18 '18 at 10:57

0 Answers0