标签:java
导入包
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Properties;
String path = this.getClass().getResource("/").getPath();
InputStream in = new BufferedInputStream(new FileInputStream(path+name));
Properties p = new Properties();
p.load(in);
通过p.getProperty("Statistic")就能获取文件中名字为Statistic的内容
.propertys中视力为:
Statistic=用户
Statisticmes=提醒
标签:java
原文地址:http://tianjian.blog.51cto.com/3549910/1665965