Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OS process priority management

807591Apr 23 2008 — edited Apr 24 2008
Hi!

Is it possible to control priority of the OS process (JVM, I guess) using Java API? I know that java.lang.Thread has some kind of priority facility, but how exactly does it relate to the OS (Windows or Linux) process priority?
For example, I would like to implement a very work-intensive long-living application, and assign low process priority to it, so that it would use mostly idle time of the CPU. Some kind of scavenger. ;)
If this is not possible to do inside Java, maybe there is a JVM launching parameter to set the process priority level?
Last resort would be to consider using JNI, I guess.

Thank you!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 22 2008
Added on Apr 23 2008
7 comments
266 views