title: How to run a GO project in eclipse with goclipse installed
body: <p>I have installed goclipse in my eclipse and created a new go project.</p>
  
  <p>Now this is what I have:</p>
  
  <p><img src="https://i.stack.imgur.com/Aeo6I.png" alt="enter image description here"></p>
  
  <p>And I have hello.go looks like this:</p>
  
  <pre><code>package main
  
  import "fmt"
  
  func main() {
       fmt.Println("Hello")
  }
  </code></pre>
  
  <p>Then I press run button, or right click the file hello.go, and then run, it gives nothing. Besides, it is also empty in bin folder.</p>
  
  <p>Then I press <code>run configurations</code> button, almost empty there with only a project name. it gives:</p>
  
  <pre><code>Given Go package not found.
  </code></pre>
  
  <p>This is my Preferences for Go:
  <img src="https://i.stack.imgur.com/aqDHl.png" alt="enter image description here"></p>
  
  <p>I noticed that both GOROOT and GOPATH are different from those listed in explorer, but once I changed them to C:\Go\src\pkg or C:\Go\src, the Apply and OK button becomes disabled. Besides, I don't have C:\Go\src\pkg folder either.</p>
  
  <p>I can <code>go install</code> or <code>go build</code> in command line, but I would like to use eclipse for another much larger project. It's windows 7, and the eclipse version is Luna Service Release 1 (4.4.1). Thank you.</p>
  
  <p>EDIT: Now I have the following configurations, and it works fine:
  Go is installed at c:\Go
  in Preferences: GOROOT:C:\Go, GOPATH: C:\Users\Tiina\go_workspace
  The rest in Preferences is filled in automatically.
  helloTest project is located at C:\Users\Tiina\go_workspace\src\helloTest
  hello.go is located at C:\Users\Tiina\go_workspace\src\helloTest\hello.go
  Maybe because I create a project from existing code, and there was something left behind, it automatically adds another GOPATH, in Preferences delete it.</p>