在sublime text 3中搭建Java開發環境
阿新 • • 發佈:2019-01-10
在jdk bin目錄下新建一個bat檔案:
如D:\JAVA\jdk1.8.0_65\bin\runJava.bat
@ECHO OFF
cd %~dp1
ECHO Compiling %~nx1.......
IF EXIST %~n1.class (
DEL %~n1.class
)
javac %~nx1
IF EXIST %~n1.class (
ECHO -----------OUTPUT-----------
java %~n1
)
在sublime text 3中新建一個編譯系統:
{ "shell_cmd": "runJava.bat \"$file\"", "file_regex": "^(...*?):([0-9]*):?([0-9]*)", "selector": "source.java", "encoding": "UTF-8" }
儲存為:
JavaC.sublime-build
c/c++配合Mingw的指令碼設定:
c
c++{ "working_dir": "$file_path", "shell_cmd": "gcc -Wall -std=c99 \"$file_name\" -o \"${file_path}/${file_base_name}\"", "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "selector": "source.c", "variants": [ { "name": "Run", "shell_cmd": "gcc -Wall -std=c99 \"$file\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\"" } ] }
{ "working_dir": "$file_path", "shell_cmd": "g++ -Wall -std=c++11 \"$file_name\" -o \"${file_path}/${file_base_name}\"", "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "selector": "source.c++", "variants": [ { "name": "Run", "shell_cmd": "g++ -Wall -std=c++11 \"$file\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\"" } ] }