finished basic account add
[Bookkeeping.git] / src / com / interrupt / bookkeeping / system / BookkeepingSystemProperties.java
blob4b2a84a4603d59cc0e753b116462b08117ac8bef
1 package com.interrupt.bookkeeping.system;
4 import java.io.File;
5 import java.io.FileReader;
6 import java.io.InputStream;
7 import java.io.IOException;
9 import com.interrupt.bookkeeping.exception.SystemException;
10 public class BookkeepingSystemProperties extends java.util.Properties {
13 private static BookkeepingSystemProperties instance = null;
15 private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(BookkeepingSystemProperties.class);
17 private BookkeepingSystemProperties() {
19 //ClassLoader cloader = this.getClass().getClassLoader();
20 //InputStream istream = cloader.getResourceAsStream("bookkeeping.properties");
22 //logger.debug("");
23 //logger.debug("BookkeepingSystemProperties:: LISTING SYSTEM PROPERTIES");
24 //logger.debug("java.class.path: "+ System.getProperty("java.class.path"));
25 //System.getProperties().list(System.out);
26 try {
27 load(BookkeepingSystemProperties.class.getResourceAsStream("/bookkeeping.properties"));
29 catch(IOException e) {
30 throw new SystemException("Problem retrieving resource 'bookkeeping.properties'", e);
35 public static BookkeepingSystemProperties instance() {
37 if(instance == null) {
38 instance = new BookkeepingSystemProperties();
40 return instance;