title: How to start a process?
body: <p>I try to start a JVM out of a Google Go program that looks like this:</p>
  
  <pre><code>package main
  import "fmt"
  import "os"
  import "log"
  func main() {
  
  var name string
  name="\\jrex64\\bin\\java.exe"
  
  var path="-Xbootclasspath:jrex64\\lib\\rt.jar;"+
  "jrex64\\lib\\jfxrt.jar;"+
  "jrex64\\lib\\resources.jar;"+
  "jrex64\\lib\\ext\\sunjce_provider.jar;"+
  "jrex64\\lib\\ext\\zipfs.jar;"+
  "jrex64\\lib\\ext\\sunmscapi.jar;"+
  "jrex64\\lib\\ext\\sunec.jar;"+
  "jrex64\\lib\\ext\\dnsns.jar;"+
  "jrex64\\lib\\ext\\access-bridge-64.jar;"+
  "jrex64\\lib\\security\\local_policy.jar;"+
  "jrex64\\lib\\jce.jar;"+
  "jrex64\\lib\\jfr.jar;"+
  "jrex64\\lib\\jsse.jar;"+
  "jrex64\\lib\\charsets.jar;"+
  "jrex64\\lib\\";
  
  
  
  var args[] string=make([]string,4)
  args[0]="-verbose"
  args[1]=path;
  args[2]="-cp Ganesha_lib\\*"
  args[3]="-jar Ganesha.jar"
  
  var attr* os.ProcAttr
  
  proc,err:=os.StartProcess(name,args,attr)
  proc.Wait();
  
  
  if err!=nil {
      fmt.Println("an error occurred.\n")
      log.Fatal(err)
  }
  
  }
  </code></pre>
  
  <p>It's my first Go program. And i'm totally overwhelmed by getting the following error:</p>
  
  <blockquote>
    <p>panic: runtime error: invalid memory address or nil pointer dereference
    [signal 0xc0000005 code=0x0 addr=0x0 pc=0x4278b5]
    goroutine 1 [running]:
    os.startProcess(0x4aacb4, 0x14, 0xf840001eb0, 0x500000005, 0x0, ...)
        C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist767862039/go/src/pkg/os/exec_posix.go:28 +0x152
    os.StartProcess(0x4aacb4, 0x14, 0xf840001eb0, 0x500000005, 0x0, ...)
        C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist767862039/go/src/pkg/os/doc.go:24 +0x5c
    main.main()
        D:/MyGoProject/src/main.go:60 +0x23c
    goroutine 2 [syscall]:
    created by runtime.main
        C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist767862039/go/src/pkg/runtime/proc.c:221
    Process finished with exit code 2</p>
  </blockquote>
  
  <p>How do i have to interpret this error code? What went wrong? And how can i get the JVM startet - it's situated in a subdirectory of the Go executable file.</p>