Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. MyClass.class.getProtectionDomain().getCodeSource().getLocation().getPath();
  2.  
  3. String yourJarName="yourJarName.jar";
  4. String Jar_path= MyClass.class.getProtectionDomain().getCodeSource().getLocation().getPath().replace(yourJarName,"").substring(1);
  5.  
  6. String yourJarName="yourJarName.jar";
  7. String Jar_path= MyClass.class.getProtectionDomain().getCodeSource().getLocation().getPath().replace(yourJarName,"");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement