public static String DEPLOY_PATH = null; static { String CurrentClassFilePath = Constant.class.getResource("").getPath(); int lastpath = CurrentClassFilePath.lastIndexOf("WEB-INF/"); DEPLOY_PATH = CurrentClassFilePath.substring(0, lastpath); }
java 动态获取web应用的部署路径
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
下一篇:srm 534
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
java linux 路径 java linux文件路径
在Linux环境中,安装jdk以后,找不到安装目录,导致无法设置环境变量,怎么查找jdk的安装目录呢?
linux java JAVA jar