Changeset 33 in tmcsimulator for trunk/src/tmcsim/cadsimulator/CADSimulator.java


Ignore:
Timestamp:
04/29/2016 12:55:04 AM (10 years ago)
Author:
bokumura
Message:

Directory Restructure: All system properties have been deprecated and replaced by the system property: "CONFIG_DIR". If CONFIG_DIR is not specified at run time, it will default to the "config/" directory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tmcsim/cadsimulator/CADSimulator.java

    r5 r33  
    135135    private Properties cadSimulatorProperties;   
    136136     
     137    private static final String CONFIG_FILE_NAME = "cad_simulator_config.properties"; 
    137138 
    138139    /** 
     
    329330     */ 
    330331    public static void main(String[] args) { 
    331         System.setProperty("CAD_SIM_PROPERTIES",  "config/cad_simulator_config.properties"); 
    332          
    333         try  
    334         { 
    335             if(System.getProperty("CAD_SIM_PROPERTIES") != null) 
    336             { 
    337                 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); 
    338                  
    339                 new CADSimulator(System.getProperty("CAD_SIM_PROPERTIES")); 
    340             } 
    341             else 
    342             { 
    343                 throw new Exception ("CAD_SIM_PROPERTIES system property not defined."); 
    344             } 
     332        if(System.getProperty("CONFIG_DIR") == null){ 
     333                System.setProperty("CONFIG_DIR", "config"); 
     334        } 
     335        try { 
     336            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); 
     337           new CADSimulator(System.getProperty("CONFIG_DIR") + System.getProperty("file.separator") + CONFIG_FILE_NAME); 
    345338        } 
    346339        catch (Exception e) { 
Note: See TracChangeset for help on using the changeset viewer.