Here you can find the source of loadProperties()
private static void loadProperties() throws Exception
//package com.java2s; //License from project: Open Source License import java.io.FileInputStream; import java.util.Properties; public class Main { private static String dataDirName; private static String fileType; private static String delimiter; private static final String DIR_PROP_NAME = "DIR"; private static final String FILE_TYPE_PROP_NAME = "FILE_TYPE"; private static final String DELIMITER_PROP_NAME = "DELIMITER"; private static void loadProperties() throws Exception { // TODO Auto-generated method stub Properties propFile = new Properties(); propFile.load(new FileInputStream("dir.properties")); dataDirName = propFile.getProperty(DIR_PROP_NAME); fileType = propFile.getProperty(FILE_TYPE_PROP_NAME); delimiter = propFile.getProperty(DELIMITER_PROP_NAME); }//w w w. j ava 2 s.c o m }