您的位置:首页 > 其它

ssh获取webContent路径

2016-12-05 15:43 274 查看
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";


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: