title: Exec command line in Node-Webkit
body: <p>I'm creating a desktop manager  for <a href="http://wiremock.org/" rel="nofollow">Wiremock</a>. Wiremock is a standalone executable <code>jar</code> that reads mock mappings from a dir named "mappings" placed in the same <code>jar</code> directory and starts a http server in localhost.</p>
  
  <p>I have created some mappings (<code>.json</code> files) and I have started my server with: <code>java -jar /path/to/wiremock/wiremock.jar</code> and it works properly. It reads nice my mappings (if you <code>GET</code> <code>localhost:&lt;port&gt;/__admin</code> you can see the mappings)</p>
  
  <p>Now, I need to start the server from <code>node-webkit</code>. I do it this way:</p>
  
  <pre><code>var exec = require("child_process").exec;
  exec("java -jar " +'"' +  WIREMOCK_PATH + "/wiremock.jar" + '"', callback);
  </code></pre>
  
  <p>And server is started, but mappings are not read! I'm executing the same <code>jar</code> file. Manually, from command line it works, but using <code>exec</code> and <code>node-webkit</code>, it doesn't. </p>
  
  <p>I have changed all the permissions of Wiremock path to be all public and still not working.</p>