title: Invoke jar file via bat and get the output to same console
body: <p>I have test.jar which just contain a single class and it has a main method. That just prints out some string to std out. I need to run this jar using .bat file. So I used</p>
  
  <pre><code>@echo off 
  start java -jar E:\FYP\jartest\out\artifacts\jartest_jar\jartest.jar %1
  </code></pre>
  
  <p>in my script. 
  When I run the bat file the output does not print to the same console. Instead it is opened in another window.</p>
  
  <p>( What I understand is I should put some 'echo variable' where the output of the java program should be assigned to 'variable'.  Or There might be some other ways ).</p>
  
  <p>What should I do?</p>
  
  <p>Thank You !</p>