title: how to trigger java aplication (java -jar <app_name> from Google GO / golang sub_process
body: <p>I'm trying to trigger java command line application as a sub process from golang.
  For some reason it failed and actually I do not get java APP interface when I start it from GO. It wait for few sec and terminate with error code "can not connect ... "
  Here is a code I tried to use:</p>
  
  <pre><code>package main
  import (
      "fmt"
      "os/exec"
  )
  func main() {
      start_java_app_test()
  }
  func start_java_app_test() {
      cmd_prep := "java -Xmx2g -jar test_app.jar"
      cmd_output, err := exec.Command("bash", "-c", cmd_prep).Output()
      if err != nil {
          fmt.Println(err)
      }
      fmt.Println(vba_ssh_cmd_output)
  }
  </code></pre>
  
  <p>If we try just to use -->  <code>cmd_prep := "java -version"</code>  &lt;--
  it  will fail again.
  It should give me output like
  &lt;&lt; snip >>
  $ java -version
  java version "1.8.0_65"
  Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
  Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
  &lt;&lt; /snip >></p>
  
  <p>The normal syntax like -->  <code>cmd_prep := "ls -l"</code>  &lt;--    works fine.
  Any clue ? 
  What might be the reason here ?
  Thanks in advance,
  .C</p>