Find in which jar a class is defined


/ Published in: Bash
Save to your folder(s)

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.


Copy this code and paste it in your HTML
  1. find -name "*.jar" -exec grep "CLASSNAME" {} \;
  2. find -name "*.jar" -exec grep "org/junit/runners/Parameterized.class" {} \;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.