Getting the Current Working Directory in Java
Description
The following code shows how to getting the Current Working Directory.
Example
//from www . j a v a2 s .com
public class Main {
public static void main(String[] argv) throws Exception {
String curDir = System.getProperty("user.dir");
System.out.println(curDir);
}
}
The code above generates the following result.