title: Java file executing using ActiveXObject only works when placing in Desktop
body: <p>I have an application which based on <code>java</code> and I am making use of <code>ActiveXObject</code> to call it.</p>
  
  <p>I have referred this <a href="https://stackoverflow.com/questions/4608356/how-to-use-wscript-exec-to-run-a-java-file">link</a> and it helped.</p>
  
  <p>I have called my java class file as follows:</p>
  
  <pre><code>var shell = new ActiveXObject("WScript.Shell");
  shell.run("cmd  /c java Test \""+param+"\"");
  </code></pre>
  
  <p><strong>It works when I put my class file Test in Desktop.</strong></p>
  
  <p>I have placed my java file inside <code>C:/Myapp</code> folder</p>
  
  <p>So I make neccessary changes in javascript activexobject call as follows:</p>
  
  <pre><code>var shell = new ActiveXObject("WScript.Shell");
  shell.run("cmd  /c java C:/Myapp/Test \""+param+"\"");
  </code></pre>
  
  <p>It is not working.</p>
  
  <p>For testing purpose I tried the command without <code>/c</code>. In both cases CMD is appearing with path upto Desktop.</p>
  
  <p>How can I execute the java file while placing inside  <code>C:/Myapp</code></p>