In a java web project in eclipse deployed in tomcat,here is the code snippet
File file = new File(".");
System.out.println(file.getAbsolutePath());
and it prints out
D:\Program_Files\eclipse\.
which is the eclipse's root installation directory,I know that "." refer to a path means the path where java command runs,but why the path is D:\Program_Files\eclipse\.
?
I found some other people test this code snippet,and they prints the path as %tomcat_home%/bin
,how can I set to get the same code result of %tomcat_home%/bin
?