淡定从容,宁静致远
全部博文(329)
发布时间:2015-11-26 17:23:04
package com.test;import java.io.FileInputStream;import java.io.IOException;import java.io.InputStream;import java.util.Properties;/** * description: * @author: matd * @version: v1.0 */public class ConfigTest {private static Properties properties;static {Stri.........【阅读全文】
发布时间:2015-11-16 09:14:23
public class Common {private static Properties properties;static {try {properties = new Properties();InputStream in = Common.class.getClassLoader().getResourceAsStream("config.properties");properties.load(in);} catch (IOException e) {e.printStackTrace();}}public static String getProperty.........【阅读全文】
发布时间:2015-11-10 10:14:42
private static Properties properties;static {try {properties = new Properties();String filePath = System.getProperty("user.dir") + "/config/config.properties";InputStream in = new BufferedInputStream(new FileInputStream(filePath));properties.load(in);} catch (IOException e) {e.printStackTrac.........【阅读全文】
发布时间:2015-11-10 10:09:07
System.out.println("java版本号:" + System.getProperty("java.version")); // java版本号System.out.println("Java提供商名称:" + System.getProperty("java.vendor")); // Java提供商名称System.out.println("Java提供商网站:" + System.getProperty("java.vendor.url")); // Java提供商网站System.out.println("j.........【阅读全文】