public static File lookupJarFile ( ) { try { return new File ( OptionsAndArgs . class . getProtectionDomain ( ) . getCodeSource ( ) . getLocation ( ) . toURI ( ) ) ; } catch ( URISyntaxException e ) { throw new IllegalStateException ( "Error: Cannot lookup jar for this class: " + e , e ) ; } }
Lookup the JAR File from where this class is loaded