1,java读取.properties配置文件
InputStream in;
try {
in = ClassLoader().getResourceAsStream("config/ipnetOracle.properties");//配置文件的路径世界著名化妆品品牌
Properties p = new Properties();牌组词语
p.load(in);
String a = p.getProperty("chirdSystem");//chirdSystem为配置文件中的key生日情侣
System.out.println(a);
} catch (IOException e) {
e.printStackTrace();
}
2,java读取.xml配置文件
File f = new File("l");
DocumentBuilderFactory factory = wInstance();
入党人的现实表现 DocumentBuilder builder = wDocumentBuilder();
Document doc = builder.parse(f);
NodeList nl = ElementsByTagName("VALUE");
for (int i = 0; i < nl.getLength(); i++) {
三观是什么 System.out.print("号码:"+ ElementsByTagName("NO").item(i).getFirstChild().getNodeValue());
>飞机托运行李规定
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论