package com.company;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class ReadProperty {
private static Properties prop = null;
static {
try {
InputStream is = ReadProperty.class.getClassLoader().getResourceAsStream("send.properties");
prop = new Properties();
prop.load(is);
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
public static String get(String key) {
if (prop != null) {
return prop.getProperty(key);
} else {
return null;
}
}
}
ReadProperty.get("logPath")