Skip to content

Commit

Permalink
Merge pull request #10 from arthur-jr/fixes
Browse files Browse the repository at this point in the history
Crashes on Windows when Java root doesn't exist
  • Loading branch information
rockyluke authored Oct 6, 2018
2 parents 052ecce + 86a1b8f commit bdc98b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions consts_windows_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ var (
func DefaultJavaPath() string {
//javaws lives in a folder with a version number on Windows, so we can search for javaws.exe
for _, r := range javaRoots {
if _, err := os.Stat(r); os.IsNotExist(err) {
continue
}
filepath.Walk(r, visit)
}
return winJavaPath
Expand Down

0 comments on commit bdc98b2

Please sign in to comment.