how to get the folder path of where a java program is running in code example Example: get executable path java final String dir = System.getProperty("user.dir");