Skip to content
This repository has been archived by the owner on Nov 9, 2018. It is now read-only.

Commit

Permalink
✍️ fix jvm file encoding not is uft-8
Browse files Browse the repository at this point in the history
  • Loading branch information
hellokaton committed Sep 11, 2017
1 parent 824dabb commit 4abf2f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tale-cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ func doStart(ctx *cli.Context) {
fmt.Println("Tale 已经启动.")
} else {
jarFileName := findJarFileName("./")
cmd := exec.Command("java", "-jar", "-Xms128m", "-Xmx128m", jarFileName, "&")
// `nohup java -Xms128m -Xmx128m -Dfile.encoding=UTF-8 -jar tale-1.3.0-alpha1.jar >tale.log &`
cmd := exec.Command("/bin/sh", "-c", `nohup java -Xms128m -Xmx128m -Dfile.encoding=UTF-8 -jar `+jarFileName+` >tale.log &`)
cmd.Dir = "."
// 重定向标准输出到文件
stdout, err := os.OpenFile("tale.log", os.O_CREATE|os.O_WRONLY, 0600)
Expand Down

0 comments on commit 4abf2f0

Please sign in to comment.