Changeset 86
- Timestamp:
- 10/21/05 15:17:58 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.mdt/src/org/modelica/mdt/corba/ModeqCommunicationImplementation.java
r85 r86 19 19 static boolean hasInitialized = false; 20 20 21 static String pathToModeq = "c:\\OpenModelica122\\modeq.exe"; 22 21 23 public static void init(String args[]) throws Exception 22 24 { … … 27 29 File f = new File(fileName); 28 30 String stringifiedObjectReference = null; 29 if(f.exists()) 31 32 if(!f.exists()) 30 33 { 31 FileReader fr = new FileReader(f); 32 BufferedReader br = new BufferedReader(fr); 34 System.out.println("Starting modeq server."); 35 String[] command = {pathToModeq, "+d=interactiveCorba"}; 36 Runtime.getRuntime().exec(command); 37 while(!f.exists()) 38 { 39 Thread.sleep(100); 40 } 41 } 42 43 FileReader fr = new FileReader(f); 44 BufferedReader br = new BufferedReader(fr); 33 45 34 stringifiedObjectReference = br.readLine(); 35 } 36 else 37 { 38 /* this is the ugly stuff, fix it */ 39 System.out.println("Filen existerar ju inte!"); 40 throw new Exception("Herrejävlar"); 41 } 46 stringifiedObjectReference = br.readLine(); 42 47 43 48 orb = ORB.init(args, null); … … 47 52 catch(Exception e) 48 53 { 54 e.printStackTrace(); 55 System.out.println(e.getMessage()); 49 56 MdtPlugin.log(e); 50 57 throw new Exception("Unable to initialize communication with OMC");
Note: See TracChangeset
for help on using the changeset viewer.