Java tutorial
public class MainClass { public static void main(String[] a) { String currentDir = System.getProperty("user.dir"); System.out.println(currentDir); } }