title: Meteor - Run Shell Command from Cordova
body: <p>I'm implementing an application in Meteor that requires a lot of processing. Because of this, we are attempting to use code written in java. I currently have an embedded web socket server that runs from a jar file, via command line. The idea being that when a user connects to Meteor from a cordova device, the embedded java jar file will be run creating a processing instance for that user. </p>
  
  <p>I can't find any definitive information as to how to run a shell command or if it would be allowed on an android or ios device. I have tried using <code>meteorhacks:npm</code> and the <code>child_process</code> packages, but am having little luck with them. </p>
  
  <p>Filesystem:</p>
  
  <pre><code>.
  app/
     /server
     /public
     /client
     /lib
  assets/
  server.jar
  </code></pre>
  
  <p>Websocket:</p>
  
  <p>The embedded server runs on <code>http://localhost:8080</code>. So a client connecting would be able to connect to their own instance.</p>
  
  <p>Any ideas as to how to run these shell commands?</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>Yes I do want to run the embedded websocket server ON THE CLIENT. </p>
  
  <p>Upon running the .jar file, a server session would be launched at <code>http://localhost:8080</code> from the device calling it. In this case, the client's mobile device.</p>