Changeset 33 in tmcsimulator for trunk/src/tmcsim/client/CADClient.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/client/CADClient.java

    r2 r33  
    6060 * @version $Date: 2009/04/17 16:27:47 $ $Revision: 1.8 $ 
    6161 */ 
    62 /*Hai :3  yeeeee*/ 
     62 
    6363public class CADClient extends UnicastRemoteObject implements 
    6464        CADClientInterface { 
     
    113113    private CADClientInterface client = this; 
    114114 
     115    private static final String CONFIG_FILE_NAME = "cad_client_config.properties"; 
     116     
    115117    /** 
    116118     * Constructor. Initialize data from parsed properties file. Create a socket 
     
    319321                    e); 
    320322        } 
     323         
    321324 
    322325        // Ensure that the properties file does not have null values for the 
     
    473476     */ 
    474477    public static void main(String[] args) { 
    475         System.setProperty("CAD_CLIENT_PROPERTIES", 
    476                 "config/cad_client_config.properties"); 
     478        if(System.getProperty("CONFIG_DIR") == null){ 
     479                System.setProperty("CONFIG_DIR", "config"); 
     480        } 
    477481 
    478482        try { 
    479             if (System.getProperty("CAD_CLIENT_PROPERTIES") != null) { 
    480                 UIManager.setLookAndFeel(UIManager 
    481                         .getSystemLookAndFeelClassName()); 
    482  
    483                 new CADClient(System.getProperty("CAD_CLIENT_PROPERTIES")); 
    484             } else { 
    485                 throw new Exception( 
    486                         "CAD_CLIENT_PROPERTIES system property not defined."); 
    487             } 
     483            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); 
     484            new CADClient(System.getProperty("CONFIG_DIR") + System.getProperty("file.separator") + CONFIG_FILE_NAME); 
     485          
    488486        } catch (Exception e) { 
    489487            cadClientLogger.logp(Level.SEVERE, "SimulationManager", "Main", 
Note: See TracChangeset for help on using the changeset viewer.