Get exe directory
String exePath = new File(getClass().getResource("").getPath()).getParentFile().getParent();
//Gives:
// "file:C:Program Files (x86)My App DirectoryMy App Name 2.2.4libmymodulename.jar!comname"
int index = exePath.lastIndexOf("\lib\mymodulename.jar!\com\name");
if (index > 0)
exePath = exePath.substring(0, index);



