sublime集成命令其实还比较简单,不知道为什么网上的教程都比较奇怪。。。五花八门的,抓不住重点。
1)新文件JAVA.sublime-build
{
"cmd": ["javac", "$file"],
"variants":
[
{
"name": "Run",
"cmd": ["java","$file_base_name"]
}
]
}
2)编辑/home/mark/.config/sublime-text-2/Packages/User/Default (Windows).sublime-keymap
[
{ "keys": ["ctrl+1"], "command": "build" },
{ "keys": ["ctrl+2"], "command": "build", "args": {"variant": "Run"} }
]
3)测试
public class Hello{
public static void main(String[] args){
System.out.println("Hello world");
}
}
Ctrl+1 编译
Ctrl+2 运行
这个大家应该都整明白了吧