Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1.  
  2. import java.io.FileInputStream;
  3. import java.io.IOException;
  4. import java.util.Properties;
  5.  
  6. public class JProperties {
  7.     public static void main(String[]args)throws IOException{
  8.         // create and load default properties
  9.         Properties defaultProps = new Properties();
  10.         FileInputStream in = new FileInputStream("properties.txt");
  11.         defaultProps.load(in);
  12.         in.close();
  13.         System.out.println((String)defaultProps.get("txt"));
  14.     }
  15.  
  16. }