Turn from Blue Sky: http://blueram.iteye.com/blog/1669799
If I compile and run Java in cmd or intellij, there will be no problem, but the following error will appear in st2:
It is estimated that javac uses GBK encoding to output information in the Chinese system, while st2 does not support GBK.
If I want to get the following results:
You can create a building system (tools-> building) in st2.
System-> new building system), enter the following content in the pop-up text box:
{ "cmd": ["javac", "$file_name", "&&", "java", "$file_base_name"], "working_dir": "${project_path:${folder}}", "selector": "source.java", "shell": true, "encoding":"gbk"}
CTRL + S: Save the name, and then manually select the new project in building system.
If I want to get the following results:
Modify the new building
System:
{ "cmd": ["javac -J-Duser.country=US", "$file_name", "&&", "java", "$file_base_name"], "working_dir": "${project_path:${folder}}", "selector": "source.java", "shell": true}