Posted By

Dorgendubal on 03/01/09


Tagged

class Bash java jar


Versions (?)

Find in which jar a class is defined


 / Published in: Bash
 

Useful when you have to deal with ClassNotFoundException. The command looks for all jar in the current directory and any sub-directory, and checks if the jar contains the specified class. The command lists all matching jars.

  1. find -name "*.jar" -exec grep "CLASSNAME" {} \;
  2. find -name "*.jar" -exec grep "org/junit/runners/Parameterized.class" {} \;

Report this snippet  

You need to login to post a comment.