示例#1
0
 public static final synchronized Configure getInstance() {
   if (instance == null) {
     instance = new Configure();
     instance.setDaemon(true);
     instance.setName(ThreadUtil.getName(instance));
     instance.start();
   }
   return instance;
 }
示例#2
0
 private void createConfig(String filename) {
   String path = getPath(filename);
   config.setProperty("PatronDB", Configure.getPath("Patrons.dbflat"));
   config.setProperty("ItemDB", Configure.getPath("Items.dbflat"));
   config.setProperty("FineDB", Configure.getPath("Fines.dbflat"));
   config.setProperty("AvailabilityDB", Configure.getPath("ItemAvailability.dbflat"));
   try {
     FileOutputStream propFile = new FileOutputStream(path);
     config.storeToXML(propFile, "");
   } catch (FileNotFoundException fnfe) {
     UserInterface.Error(104);
   } catch (IOException ioe) {
     UserInterface.Error(104);
   }
 }