Friday 18 October 2013

How get current path in java system dir

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);
            
            }
        }

No comments:

Post a Comment