Skip to content

Commit a5f6745

Browse files
authored
Merge pull request #1495 from chwdy/ahahaha
Change command encoding to support Chinese display when excuting java.
2 parents 694c8e0 + dc2fd47 commit a5f6745

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/grammars/java.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports =
1919
sourcePath = GrammarUtils.Java.getProjectPath context
2020
if windows
2121
return ["/c javac -Xlint #{context.filename} && java #{className}"]
22-
else ['-c', "javac -sourcepath '#{sourcePath}' -d /tmp '#{context.filepath}' && java -cp /tmp #{classPackages}#{className}"]
22+
else ['-c', "javac -J-Dfile.encoding=UTF-8 -sourcepath '#{sourcePath}' -d /tmp '#{context.filepath}' && java -Dfile.encoding=UTF-8 -cp /tmp #{classPackages}#{className}"]
2323
}
2424
Kotlin:
2525
'Selection Based': {

0 commit comments

Comments
 (0)