Skip to content

Instantly share code, notes, and snippets.

@posilva
Created March 7, 2014 15:24
Show Gist options
  • Save posilva/9413470 to your computer and use it in GitHub Desktop.
Save posilva/9413470 to your computer and use it in GitHub Desktop.
private static String GetExecutionPath() {
String absolutePath = JavaApplication1.class.getProtectionDomain().getCodeSource().getLocation().getPath();
absolutePath = absolutePath.substring(0, absolutePath.lastIndexOf("/"));
absolutePath = absolutePath.replaceAll("%20", " "); // Surely need to do this here
return absolutePath;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment