Compile、Make和Build的区别

简介:
针对Java的开发工具,一般都有Compile、Make和Build三个菜单项,完成的功能的都差不多,但是又有区别。
 
编译,是将源代码转换为可执行代码的过程。编译需要指定源文件和编译输出的文件路径(输出目录)。Java的编译会将java编译为class文件,将非java的文件(一般成为资源文件、比如图片、xml、txt、poperties等文件)原封不动的复制到编译输出目录,并保持源文件夹的目录层次关系。
 
在Java的集成开发环境中,比如Eclipse、IDEA中,有常常有三种与编译相关的选项Compile、Make、Build三个选项。这三个选项最基本的功能都是完成编译过程。但又有很大的区别,区别如下:
1、Compile:只编译选定的目标,不管之前是否已经编译过。
 
2、Make:编译选定的目标,但是Make只编译上次编译变化过的文件,减少重复劳动,节省时间。(具体怎么检查未变化,这个就不用考虑了,IDE自己内部会搞定这些的)
 
3、Build:是对整个工程进行彻底的重新编译,而不管是否已经编译过。Build过程往往会生成发布包,这个具体要看对IDE的配置了,Build在实际中应用很少,因为开发时候基本上不用,发布生产时候一般都用ANT等工具来发布。Build因为要全部编译,还要执行打包等额外工作,因此时间较长。


本文转自 leizhimin 51CTO博客,原文链接:http://blog.51cto.com/lavasoft/436216,如需转载请自行联系原作者
相关文章
|
17天前
【petalinux 2024.01】petalinux-build时module ‘plnx_vars‘ has no attribute ‘CopyDir‘错误
【petalinux 2024.01】petalinux-build时module ‘plnx_vars‘ has no attribute ‘CopyDir‘错误
15 0
|
4月前
|
人工智能 机器人 测试技术
【CMake报错】Cannot specify compile definitions for target “PRIVATE“ which is not built...
【CMake报错】Cannot specify compile definitions for target “PRIVATE“ which is not built...
|
4月前
|
IDE 开发工具 C++
CMake中文手册_target_sources(3.26)
CMake中文手册_target_sources(3.26)
336 0
|
4月前
MTK在编译10A的target时报错:make: *** [mmi_feature_check]
MTK在编译10A的target时报错:make: *** [mmi_feature_check]
19 0
|
4月前
|
C语言
make的执行步骤以及常见的make命令,make distclean 以及和make clean的区别
make的执行步骤以及常见的make命令,make distclean 以及和make clean的区别
124 0
|
4月前
|
C++
make 及 make clean 的作用
make 及 make clean 的作用
89 0
|
4月前
解决运行qmake:Project ERROR: Cannot run compiler ‘cl‘. Output:
解决运行qmake:Project ERROR: Cannot run compiler ‘cl‘. Output:
470 0
|
机器人 Linux 编译器
替代notepad++,notepad--介绍及插件cmake编译
替代notepad++,notepad--介绍及插件cmake编译
|
开发工具 git
编译pluma:configure.ac:229: error: required file ‘pluma/mate-submodules/Makefile.in‘ not found
编译pluma:configure.ac:229: error: required file ‘pluma/mate-submodules/Makefile.in‘ not found
116 0
编译OpenJDK8:configure: Could not compile and link with freetype. This might be a 32/64-bit mismatch.
编译OpenJDK8:configure: Could not compile and link with freetype. This might be a 32/64-bit mismatch.
90 0