many time we required to get current system dir path
String currentPath= System.getProperty("user.dir");
here is full example
public class Path {
public static void main(String args[]) {
String currentPath = System.getProperty("user.dir");
System.out.println(" ");
System.out.println("Current working directory path in Java : " + currentPath);
}
}
String currentPath= System.getProperty("user.dir");
here is full example
public class Path {
public static void main(String args[]) {
String currentPath = System.getProperty("user.dir");
System.out.println(" ");
System.out.println("Current working directory path in Java : " + currentPath);
}
}
No comments:
Post a Comment