【发布时间】:2015-10-05 15:47:56
【问题描述】:
我有这个工作的绝对路径
String path = "C:/projects/ISI7/Releases/Release_15.2/EXT_JS/src/main/webapp/WEB-
INF/classes/commonComponents/ApplicationResources_"+ language + ".properties";
我想获取相对路径。我认为相对路径是:
String path = "classes/commonComponents/ApplicationResources_"+ language + ".properties";
但我得到了 fileNotFound 异常
我尝试过的是:
String path = "commonComponents/ApplicationResources_"+ language + ".properties";
它也没有工作。使用 JDK 1.6 和 Windows 操作系统。
【问题讨论】:
标签: java file path relative-path