/*
Application Configuration
D:\Data
jdbc:mysql://localhost/mydb
*/
import java.io.FileInputStream;
import java.util.Properties;
public class Main {
public static void main(String[] args) {
Properties properties = new Properties();
String dataFolder = properties.getProperty("data.folder");
System.out.println("dataFolder = " + dataFolder);
String jdbcUrl = properties.getProperty("jdbc.url");
System.out.println("jdbcUrl = " + jdbcUrl);
}
public Properties readProperties() throws Exception {
Properties properties = new Properties();
FileInputStream fis = new FileInputStream("configuration.xml");
properties.loadFromXML(fis);
return properties;
}
}