/* * Created on Oct 1, 2003 * * To change the template for this generated file go to * Window>Preferences>Java>Code Generation>Code and Comments */ package DatabaseCommunication; /** * @author student * * To change the template for this generated type comment go to * */ import java.util.*; import java.io.*; public class PropertiesTest { public static void main(String[] args) { try{ Properties p = new Properties (); p.load(new FileInputStream("coffee.txt")); String url = p.getProperty("MYSQLURL"); String url2 = p.getProperty("URL"); //String url = "jdbc:mysql://172.21.5.26:3306/coffee"; System.out.println("MYSQLURL "+url); System.out.println("URL "+url2); } catch(Exception e){ System.out.println(e.toString()); } } }