I'm developing a Java app and would like to see how it runs on slower/overloaded machines. (I suspect there may be some thread unsafe issues, etc. that get ignored because my machine just compiles it quickly enough.
Is there a way to simulate high CPU load/limit available CPU for the Java app? Of course, I could write a script to actually overload my CPU with various tasks, but I would prefer to keep the rest of my OS running smoothly and not overheat my machine, if possible. Is there an easy/known way to do this?
I am currently using Eclipse Kepler as my IDE, but would be willing to switch if another could do this natively.
EDIT: I'm working in Windows, forgot to clarify. :)