【java】获取eclipse的安装路径以及工程名称
2017-05-10 10:38
489 查看
String eclipseRootPath = System.getProperty("user.dir"); String rootPath = eclipseRootPath.substring(0, eclipseRootPath.lastIndexOf("\\")); URL realPath = this.getClass().getResource("/"); String projectName = realPath.getPath().substring(realPath.getPath().indexOf("webapps")+8, realPath.getPath().indexOf("WEB-INF")-1); String saveBasePath = rootPath + "\\" + projectName +"Config"; System.out.println(saveBasePath);
相关文章推荐
- java取得项目工程---获取文件的相对路径问题---getResource()和getResourceAsStream以及路径问题
- java取得项目工程---获取文件的相对路径问题---getResource()和getResourceAsStream以及路径问题
- maven的安装、路径配置、修改库文件路径和eclipse中的配置、创建maven工程。
- java后台获取Excel后缀名以及sheet页名称
- JAVA获取当前工程路径(非web工程)
- Java乔晓松-Android SD卡路径问题以及如何获取SDCard内存大小
- 关于java和web工程项目中各种路径的获取总结
- 程序获取eclipse工程下文件路径的解决方法
- java 工程获取路径 web根目录。 项目classpath根目录 各种实用方法
- java 工程获取路径 web根目录。 项目classpath根目录 各种实用方法 摘抄收藏
- java获取rcp工程的路径
- Java中获取工程路径
- Eclipse下的java工程目录问题和路径问题理解
- 【java&JSP】中获取工程路径的各种方法
- Java 学习笔记22:Maven以及其Eclipse插件m2eclipse的安装
- JAVA中获取工程路径的方法
- java工程路径的获取
- 第八届山东ACM(青科之行)赛后总结以及关于ubuntu系统下 codeblocks 和java 的安装和获取root权限
- 判断以及获取visual studio安装路径
- JAVA,JSP,Servlet获取当前工程路径-绝对路径