获得properties文件的路径,读取properties文件的参数
来源:互联网 发布:mac激活时间相差20天 编辑:程序博客网 时间:2024/05/16 00:51
import java.util.*;
import java.io.*;
public class test{
private String findPath()
{
String path = getClass().getClassLoader().getResource("").getPath();
int pathLength = path.length();
path = path.substring(1, pathLength);
path = path + "my.properties";
return path;
}
public static void main(String args[]) throws Exception{
Properties pr = new Properties();
test t = new test();
String path=t.findPath();
System.out.println("aaaaa"+path);
FileInputStream fis = new FileInputStream("my.properties");
pr.load(fis);
pr.list(System.out);
}
}
- 获得properties文件的路径,读取properties文件的参数
- 读取配置参数的properties文件,路径获取完美解决
- 读取配置参数的properties文件,路径获取完美解决
- 读取properties文件获得的为乱码
- .properties文件读取时的路径问题
- properties 文件的读取
- properties文件的读取
- Properties文件的读取
- Properties文件的读取。
- properties文件的读取
- properties文件的读取
- properties文件路径读取
- XX.properties文件参数读取路径问题
- 获得Properties文件的内容
- 读取properties文件的例子.
- 读取properties文件的方法
- properties文件的读取方式
- 读取Properties文件的方法
- Ajax程序设计入门
- 判断是否为数字
- 用好VS2005之扩展membership服务
- JS和JAVA的分隔字符串函数
- oracle 恢复试验
- 获得properties文件的路径,读取properties文件的参数
- Ajax实现DataGrid/DataList动态ToolTip
- [源码分析]Community Server的MemberRole之Profile
- tcl语言
- 打印当前时间
- Ajax无刷新实现图片切换特效
- css控制打印时强制分页
- Ctfmon.exe 文件
- DBV——DBVerify