一、C++开发环境配置
1. 下载MingW
2. 环境变量配置,系统属性->高级设置->环境变量,假设Mingw装在c盘更文件夹,其他自己思考
(1)PATH 变量值中增加 C:MinGWin
(2)LIBRARY_PATH 变量值中增加 C:MinGWlib,
(3)C_INCLUDEDE_PATH 变量值中增加 C:MinGWinclude
用Sublime Text3 新建C++ 编译系统,设置为下面代码:
{ "cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"], "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?
:?
(.*)$", "working_dir": "${file_path}", "selector": "source.c, source.c++", "encoding": "cp936", "shell": true, "variants": [ { "name": "Run", //"cmd": ["CMD", "/U", "/C", "g++ ${file} -o ${file_base_name} && ${file_base_name}"] "cmd": [ "start", "${file_path}/${file_base_name}.exe"] } ] }
2)对于Linux环境:
C.sublime-build:
"shell_cmd": "gcc "${file}" -o "${file_path}/${file_base_name}" -lm -Wall",
"file_regex": "^(..[^:]*):([0-9]+):?
([0-9]+)?:?
(.*)$",
"working_dir": "${file_path}",
"selector": "source.c",
"variants":
"name": "Run",
"shell_cmd": "x-terminal-emulator -e bash -c ""${file_path}/${file_base_name}" ; read -p 'Press any key to continue...'""
C++.sublime-build:
"shell_cmd": "g++ "${file}" -o "${file_path}/${file_base_name}" -lm -Wall",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?
:?
(.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
"name": "Run",
"shell_cmd": "x-terminal-emulator -e bash -c ""${file_path}/${file_base_name}" ; read -p 'Press any key to continue...'""
1. 设置 Java PATH 变量
这是第一步也是最主要的一步,用来设置编译和执行 Java 程序基本命令如 javac 和 java 的存放路径。
在 Windows 下设置 PATH 路径的步骤:
右键“我的电脑”
选择“属性”
进入高级系统设置
找到并点击“环境变量”button
进入系统变量并找到 PATH 变量
粘贴 JDK 的 bin 文件夹到 PATH 变量值的最后
比如你的 JDK 的 bin 路径是 C:Program FilesJavajdk1.6.0_17in ,粘贴的效果例如以下图所看到的:
2. 用Sublime Text3 新建 JAVA 编译系统,设置为下面代码:
{ "cmd": ["javac","-encoding","UTF-8","-d",".","$file"], "file_regex": "^(...*?):([0-9]*):?([0-9]*)", "selector": "source.java", "encoding":"GBK", "variants": [ { "name": "Run", "shell": true, "cmd" : ["start","cmd","/c", "java ${file_base_name}&pause"], "working_dir": "${file_path}", "encoding":"GBK" } ] }