davyM has a good answer but I thought I'd also mention that the following method exists in Java:
Thread.setPriority(int newPriority)
This sets the internal Java thread scheduling priority for the thread. A thread can use Thread.currentThread()
to set its own priority, or you can set the priority of a thread externally. According to the code, the default priority is 5, the minimum is 1, and the maximum is 10. A thread inherits the priority of the thread that created it.
This priority is only relevant for CPU intensive threads only -- in situations where you have a number of threads that are performing calculations and you want one to get larger time-slices from the scheduler. Obviously if a thread is blocking on IO, the priority is going help marginally. Also, I suspect that how this behaves on a multi-processor box is very OS dependent.
Here's a page that seems useful although they don't seem to take into account thread starvation: http://www.janeg.ca/scjp/threads/scheduling.html