Communitytreffen-Moderator
Google, erstes Ergebnis:
Sun Developer Network - Retrieving the path where the app is started - Letzter Post
Zitat
This method will get the path to the jar or class file no-matter where the jar is called from.
// Get the applications path.
File appPath = new File(System.getProperty("java.class.path"));
try
{
appPath = appPath.getCanonicalFile().getParentFile();
}
catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("Path: " + appPath.toString());
...