Thursday, February 21, 2002 05:39 AM
The only control you have is how many threads your Java application uses. If you use a single thread, Java cannot use both processors at once.
If you use multiple threads, its up to the VM as well as the Operating System to decide which CPU runs which threads.
If you have an application that can take advantage of multiple CPUs, I strongly recommend that you split up your work into multiple threads. That way, you'll get a performance boost on multi-CPU machines, but not too much degradation for single-processor boxes.