使用多个内核/编译时的Java处理器 [英] Using multiple cores/processors when compiling Java

查看:118
本文介绍了使用多个内核/编译时的Java处理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用八核台式机来使用Ant构建Java应用程序(通过javac的目标)。有没有办法通过使用多个线程或进程加快编制?

I use a desktop with eight cores to build a Java application using Ant (through a javac target). Is there a way to speed up the compilation by using more than one thread or process?

我知道我可以并行运行多个Ant任务,但我不认为这是可以应用于单个编译目标,或做它?

I know I can run several Ant tasks in parallel, but I don't think this can be applied to a single compilation target, or does it?

推荐答案

我不知道有没有办法做到告诉蚂蚁本身有效地利用多个核心。但是,<一个href=\"http://publib.boulder.ibm.com/infocenter/rtnlhelp/v6r0m0/index.jsp?topic=/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/JDTCompilerAdapter.html\">you可以告诉ant使用Eclipse编译器,这对内置多线程编译 -in。

I don't know of any way to do tell ant itself to make effective use of multiple cores. But you can tell ant to use the Eclipse Compiler, which has support for multithreaded compilation built-in.

这篇关于使用多个内核/编译时的Java处理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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