java获取当前路径。

 this.getClass().getResource("")+“src\\location.xml”
原文地址:https://www.cnblogs.com/java727/p/2889176.html