9

Is there some way to make Eclipse or JDK 1.7 to utilize multiple cores of my CPU while compiling Java sources?

I see only 1 CPU core is used, which takes few seconds after each small change in my source files. This limits my programming progress.

Maybe there's some switch or setting for the JDK to utilize more of CPU and compile faster?

Pointer Null
  • 39,597
  • 13
  • 90
  • 111
  • Maybe you should not compile your sources after each new character, disable automatic build or such? I compile once every 15 minutes...and this is fairly often, as normally more time is spend on thinking than "Hack in some lines and look if the compiler eats it". ;-) – Volker Sep 10 '12 at 09:07
  • I learn if compiler "eats it" instantly, Eclipse has kind of pre-check as you type. And I don't take your style of 15-minutes compile cycle, sorry. – Pointer Null Sep 10 '12 at 09:39
  • Eclipse is suppose to do this already, check out this [similar discussion](http://stackoverflow.com/questions/3727493/using-multiple-cores-processors-when-compiling-java). – yorkw Sep 10 '12 at 21:57
  • I thought Android developer tools didn't support Java 1.7? – NoBugs Sep 30 '12 at 01:45
  • You may use JDK 1.7, and still set compiler's compliance level to 1.6. – Pointer Null Sep 30 '12 at 10:31

1 Answers1

0

Here and here are two SO questions related to this one. The first one mentions this oracle source about making javac multithreaded, but it seems not much progress has been made. The second link says you can tell ant to use the eclipse compiler, which has support for multithreaded compilation.

Community
  • 1
  • 1
NickL
  • 4,258
  • 2
  • 21
  • 38