Ignore:
Timestamp:
11/02/05 16:34:32 (19 years ago)
Author:
remar
Message:
  • if running OMC fails, see if omc (or omc.exe) is in Compiler/
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/org.modelica.mdt/src/org/modelica/mdt/internal/corba/OMCProxy.java

    r109 r115  
    114114        catch(IOException e)
    115115        {
    116             throw new InitializationException
    117                 ("Unable to start Open Modelica Compiler");
     116            String secondaryPathToOmc = null;
     117            try
     118            {
     119                if(os.equals("Linux"))
     120                {
     121                    secondaryPathToOmc = omHome + "/Compiler/omc";
     122                }
     123                else if(os.equals("Windows"))
     124                {
     125                    secondaryPathToOmc = omHome + "\\Compiler\\omc.exe";
     126                }
     127                command = new String[]{secondaryPathToOmc, "+d=interactiveCorba"};
     128                Runtime.getRuntime().exec(command);
     129            }
     130            catch(IOException ex)
     131            {
     132                throw new InitializationException
     133                    ("Unable to start Open Modelica Compiler\n"
     134                     + "Tried starting " + pathToOmc
     135                     + " and " + secondaryPathToOmc);
     136            }
    118137        }
    119138
Note: See TracChangeset for help on using the changeset viewer.