ssh获取webContent路径:
String t=Thread.currentThread().getContextClassLoader().getResource("").getPath();
int num=t.indexOf(".metadata");
String path=t.substring(1,num).replace('/', '\')+"项目名\WebContent\文件名";

String t=Thread.currentThread().getContextClassLoader().getResource("").getPath();
int num=t.indexOf(".metadata");
String path=t.substring(1,num).replace('/', '\')+"SSH-Test\WebContent\file\CaculatorProcess.bpel";
java获取根路径:
String relativePath = System.getProperty("user.dir");
String bpellocation = relativePath+"\file\BpelTest.bpel";

最后
以上就是尊敬发箍最近收集整理的关于ssh获取webContent路径的全部内容,更多相关ssh获取webContent路径内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复