Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to improve multicore / multiprocessor performance of the Java compiler?

Tags:

My coworker noticed that when javac is compiling it only utilizes a single core. Is there anything like the -j command with the gcc for Java that will allow us to distribute the compiler workload across cores or processors? If not, do you think that this will ever be possible or is there some sort of fundamental restriction as a result of Java's design?

The environment is Linux with the Sun J2SE 1.6.0.11 jdk.

like image 924
Elijah Avatar asked Feb 07 '09 10:02

Elijah


1 Answers

Although not exactly an answer to your question, some build environments like ant also support parallelization of builds, so if your dependency graph permits you can have multiple javac's running at the same time.

like image 136
krosenvold Avatar answered Sep 20 '22 03:09

krosenvold