1

I have some very serious JAR hell going on, and need to scan my entire Java classpath (consisting of more than 50 JARs) for all the instances where a particular class is used, let's call it com.fizz.buzz.Widget.

This Widget class could be referenced both from inside bytecode (.class files) as well as XML descriptor files inside the JARs. I imagine I would need a 2-pronged approach: 1 phase where I essentially zgrep through all the JARs, scanning for XML files containing com.fizz.buzz.Widget in them, and a 2nd phase where I somehow scan the bytecode. Either way, not entirely sure what I need to do for both phases, or if there is a magical tool that does this for me all in one fell swoop. Ideas?

Kevin Panko
  • 8,356
  • 19
  • 50
  • 61
AdjustingForInflation
  • 1,571
  • 2
  • 26
  • 50
  • There are many tools that will find references in code. Unless it's a known XML format you'll likely need to roll that one yourself. As long as you're sure there's nothing else instantiating/referencing the classes (e.g., reflection) that should be sufficient. It's actually pretty easy to walk bytecode using any of the several tools available, though. – Dave Newton Jan 23 '14 at 18:40
  • Take a look at CodePro Analytix: https://developers.google.com/java-dev-tools/codepro/doc/?csw=1 I don't know if it searches the XML files or not though. – Mike B Jan 23 '14 at 19:57
  • Thanks, you made me love Visual Studio even more. +1 – Federico Berasategui Jan 23 '14 at 20:03

0 Answers0