get directory program is run in java code example Example: get executable path java final String dir = System.getProperty("user.dir");