VBA to JAVA link
<p>I'm currently trying to link a simulation program (written in VBA) to my JAVA application using COM2JAVA tool. I 'm facing couple problems and I hope to find someone to help in here..</p>

<p>1- The local host: I'm supposed to link my program to a specified simulation case, the way to do it in VBA is as follows:</p>

<pre><code>Set hyCase = GetObject(“c:\samples\c-2.hsc”, “HYSYS.SimulationCase”)
</code></pre>

<p>through wrapping classes provided by COM2JAVA, I can have the following constructors:</p>

<pre><code>Application(java.lang.String host)
</code></pre>

<p>Construct a Application on specified host.</p>

<p>OR</p>

<pre><code>/**
   * Construct a SimulationCase on specified host.
   * @param     host  the host on which the object should be created
   * @exception java.io.IOException if there are problems communicating via DCOM 
   * @exception java.net.UnknownHostException if the host can not be found 
   */
  public SimulationCase(String host) throws java.io.IOException, java.net.UnknownHostException {
    d__SimulationCaseProxy = new hysys._SimulationCaseProxy(CLSID, host, null);
  }
</code></pre>

<p>The question is: how to specify the host and is it relevant to the path where my simulation case lives? I tried to feed it the path as host but it didn't work out (I know it might seem dumb :D )</p>

<p>2- I can't run the program on Eclipse because I have to type this command everytime I load the program on cmd:</p>

<pre><code>java -DJINTEGRA_NATIVE_MODE Code
</code></pre>

<p>is there anyway to set that in Eclipse?</p>