Monday, September 1, 2014

Java: Relative path of the current working Project folder

Relative path of the current working Project folder

System.out.println((new File("")).getAbsolutePath());
 
-----------------OR -----------------
     File currDir = new File(".");
     String path = currDir.getAbsolutePath();
     System.out.println(path);