获取工程路径(兼容windows和linux)
来源:互联网 发布:linux下如何安装vim 编辑:程序博客网 时间:2024/06/03 21:18
ServletContext context = getServletContext(); String rootPath = context.getRealPath("/"); log.info("root path[" + rootPath + "]"); //如果最后一位没有分隔符,则加上 if (File.separatorChar != rootPath.charAt(rootPath.length() - 1)) { rootPath = rootPath + File.separatorChar; } log.info("root path[" + rootPath + "]"); String config = getInitParameter("config"); File rootDir = new File(rootPath + "WEB-INF" + File.separatorChar); File[] childFile = FileUtils.getFiles(rootDir, config);
0 0
- 获取工程路径(兼容windows和linux)
- java兼容windows和linux路径分割符用法
- golang实现兼容Linux和Windows的路径处理
- Java文件夹操作,判断多级路径是否存在,不存在就创建(包括windows和linux下的路径字符分析),兼容Windows和Linux
- AES加密(兼容linux和windows)
- C++ 获取当前时间毫秒数(兼容windows和linux)
- 获取本机的IP地址(Windows和Linux兼容)
- paip.log4j兼容linux windows 路径设置
- Java获取工程路径(包括非web工程和web工程)
- 在linux和windows下获取路径的常用方法
- Java下兼容linux和windows文件路径的间隔符的写法
- Java下兼容linux和windows文件路径的间隔符的写法
- 获取项目工程文件路径和rDocuments路径
- linux和windows路径处理
- C++ windows API获取驱动器根路径和属性(-)
- 获取工程路径!
- 获取工程路径
- 获取工程当前路径
- Cocos2d-x 3.0 事件系统
- sstream类的详解
- 关于Android 获得图片的总结
- 计算机相关专业EI及SCI国际会议及期刊汇总
- Sql 实现自动添加行数标记
- 获取工程路径(兼容windows和linux)
- MySQL 编码设置
- Syntax error,parameterized types are only available if source level is 5.0 错误的解决方法
- 《九阴真经》作者是
- bootstrap tab页
- ATM机简单功能的实现(vs2010环境)
- 正则表达式
- Asp.net-MyFirstMVCProject详解
- 轻松掌握ISO8583报文协议