To get current directory location we can use user.dir property
System.getProperty("user.dir")
Example
package com.pretech;public class CurrentDirectory {public static void main(String[] args) {System.out.println("Current Directory :"+ System.getProperty("user.dir"));}}
No comments:
Post a Comment