My current attempt is:
File executionDir = new File("").getCanonicalFile();
ApplicationInfo info = ApplicationRegistry.getApplicationInfoByDir(executionDir);
return info.getVersion();
It works, but I wonder if there is a way to get at the information without making any assumptions about the current working directory?