Java Get Jar Execution Directory

return new File(MyClass.class.getProtectionDomain().getCodeSource().getLocation()
    .toURI()).getPath();
Homeless Hawk