Changeset 33 in tmcsimulator for trunk/src/tmcsim/paramicscommunicator
- Timestamp:
- 04/29/2016 12:55:04 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tmcsim/paramicscommunicator/ParamicsCommunicator.java
r26 r33 19 19 import java.util.logging.Level; 20 20 import java.util.logging.Logger; 21 21 22 import javax.swing.JOptionPane; 22 23 import javax.swing.UIManager; 24 23 25 import org.w3c.dom.Document; 24 26 import org.w3c.dom.Element; 27 25 28 import tmcsim.common.CADProtocol.PARAMICS_ACTIONS; 26 29 import tmcsim.common.CADProtocol.PARAMICS_COMM_TAGS; … … 60 63 { 61 64 62 /** 65 private static final String CONFIG_FILE_NAME = "paramics_communicator_config.properties"; 66 /** 63 67 * Error logger. 64 68 */ … … 480 484 * @param args Command line arguments. 481 485 */ 482 public static void main(String[] args) 483 { 484 System.setProperty("PARAMICS_COMM_PROPERTIES", "config/paramics_communicator_config.properties"); 485 486 try 487 { 488 if (System.getProperty("PARAMICS_COMM_PROPERTIES") != null) 489 { 490 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); 491 492 new Thread(new ParamicsCommunicator(System.getProperty( 493 "PARAMICS_COMM_PROPERTIES"))).start(); 494 } else 495 { 496 throw new Exception("PARAMICS_COMM_PROPERTIES system property not defined."); 497 } 498 } catch (Exception e) 499 { 486 public static void main(String[] args) { 487 if(System.getProperty("CONFIG_DIR") == null){ 488 System.setProperty("CONFIG_DIR", "config"); 489 } 490 491 try{ 492 493 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); 494 new Thread(new ParamicsCommunicator(System.getProperty("CONFIG_DIR") + System.getProperty("file.separator") + CONFIG_FILE_NAME)).start(); 495 496 } catch (Exception e) { 500 497 paramLogger.logp(Level.SEVERE, "ParamicsCommunicator", "Main", 501 498 "Error occured initializing application", e);
Note: See TracChangeset
for help on using the changeset viewer.
