public class ReadFile {public void readPropertiesFile(String createFile) throws FileNotFoundException { String path = getClass().getResource("/").getPath();
System.out.println(path);
}public static void main(String[] args) throws FileNotFoundException {
// TODO Auto-generated method stub
new ReadFile().readPropertiesFile("testMer.key.p8");}}这个类,我在两个不同的项目中(比方说A项目,B项目)都有,我想测试下路径path的值,但是,在两个不同的工程下,路径相差很大,为什么哦?在A项目中,其path的值是“D:/workspace/TestProject/WebRoot/WEB-INF/classes/”在B项目中,其path的值是“/D:/workspace/%e8%be%bd%e5%ae%81%e6%b8%85%e7%bb%93%e7%ae%97%e7%b3%bb%e7%bb%9fV1/defaultroot/WEB-INF/classes/”我主要不理解B项目中,path值怎么有那么多%,貌似这个路径被处理过了,这表示什么意思哦?