Guest User

Untitled

a guest
Jul 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. Useful when you have class collisions in your classpath.
  2.  
  3. ```
  4. Class<?> clazz = ...;
  5. CodeSource src = clazz.getProtectionDomain().getCodeSource();
  6. if (src != null) {
  7. System.out.println(src.getLocation().getPath());
  8. }
  9. ```
Add Comment
Please, Sign In to add comment