为什么没有人用做对Java? [英] Why is no one using make for Java?

查看:132
本文介绍了为什么没有人用做对Java?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚想是我见过或者使用Maven的蚂蚁或每一个Java项目。它们是很好的工具,我想几乎所有的项目都可以使用它们。但是,什么都发生在使?它是用于各种非Java项目,并可以轻松处理Java的。当然,你有,如果你使用的是Windows,但Ant和Maven下载的make.exe也不来与JDK。

Just about every Java project that I've seen either uses Maven or Ant. They are fine tools and I think just about any project can use them. But what ever happened to make? It's used for a variety of non-Java projects and can easily handle Java. Sure you have to download make.exe if you use Windows, but Ant and Maven also don't come with the JDK.

与Java使用时有没有用make一些根本的缺陷?难道仅仅是因为Ant和Maven都用Java编写的?

Is there some fundamental flaw with make when used with Java? Is it just because Ant and Maven are written in Java?

推荐答案

通过制作和Java的基本问题是,让您拥有指定的依赖关系,然后一个规则来解决依赖的premise作品。

The fundamental issue with Make and Java is that Make works on the premise that you have specify a dependency, and then a rule to resolve that dependency.

使用基本的C,通常到main.c文件转换为main.o中的文件,运行CC main.c中。

With basic C, that typically "to convert a main.c file to a main.o file, run "cc main.c".

您可以做到这一点在Java中,但你很快学到一些东西。

You can do that in java, but you quickly learn something.

大部分是javac编译器很慢启动。

Mostly that the javac compiler is slow to start up.

的区别:

javac Main.java
javac This.java
javac That.java
javac Other.java

javac Main.java This.java That.java Other.java

是白天和黑夜。

加剧,随着数以百计的类,它只是变得站不住脚的。

Exacerbate that with hundreds of classes, and it just becomes untenable.

然后再加上了Java往往被安排在目录中的文件组,对C,而另一些向扁平化结构趋于事实。让没有太多直接的支持与文件层次的工作。

Then you combine that with the fact that java tends to be organized as groups of files in directories, vs C and others which tend towards a flatter structure. Make doesn't have much direct support to working with hierarchies of files.

请在确定文件是过时的东西,在集合级别也不是很不错的。

Make also isn't very good at determining what files are out of date, at a collection level.

通过蚂蚁,它会经过并总结了所有过时的文件,然后编译它们一气呵成。让就叫每个单独编译java编译器。有使无法做到这一点,需要足够的外部工具,以真正显示,使不太胜任这项任务。

With Ant, it will go through and sum up all of the files that are out of date, and then compile them in one go. Make will simply call the java compiler on each individual compiler. Having make NOT do this requires enough external tooling to really show that Make is not quite up to the task.

这就是为什么像Ant和Maven的替代品起来。

That's why alternatives like Ant and Maven rose up.

这篇关于为什么没有人用做对Java?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆