Java examples for java.util:Properties File
set Properties
import java.io.IOException; import java.util.Properties; public class Main{ private static Properties props = null; private final static void setProperties(){ props = new Properties(); try {// ww w. j a v a2s. co m props.load(Main.class.getResourceAsStream("/server/config/server.properties")); } catch (IOException e) { props = null; e.printStackTrace(); } } }