diff --git a/.gitignore b/.gitignore index 680e368..02d3d7e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ store *.exe .idea *.zip +.run \ No newline at end of file diff --git a/.run/go build github.com_ystyle_jvms.run.xml b/.run/go build github.com_ystyle_jvms.run.xml deleted file mode 100644 index 406f728..0000000 --- a/.run/go build github.com_ystyle_jvms.run.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/main.go b/main.go index 51b55a9..c180c30 100644 --- a/main.go +++ b/main.go @@ -313,7 +313,7 @@ func getJavaHome(jdkTempFile string) string { var javaHome string fs.WalkDir(os.DirFS(jdkTempFile), ".", func(path string, d fs.DirEntry, err error) error { if filepath.Base(path) == "java.exe" { - temPath := strings.Replace(path, "/bin/java.exe", "", 1) + temPath := strings.Replace(path, "bin/java.exe", "", -1) javaHome = filepath.Join(jdkTempFile, temPath) return fs.SkipDir }