You can get the absolute path to your webApp/WEB-INF/classes , as shown below:
URL resource = getClass().getResource("/"); String path = resource.getPath();
This will return you the absolute path as follows:
/C:/SERVERS/x/y/x/yourApp/WEB-INF/classes
And from this you can get the path to yourApp directory:
path = path.replace("WEB-INF/classes/", "");
which you can use to specify paths, such as /Rod1/thermalMap.exe , by adding path to this.
source share