Since we have to make this platform-dependent, I start the shell process from java and restore its parent. The parent process is our Java process.
import java.io.*; public class Pid { public static void main(String sArgs[]) throws java.io.IOException, InterruptedException { Process p = Runtime.getRuntime().exec( new String[] { "sh", "-c", "renice 8 `ps h -o ppid $$`"
By the way: are you Brad Mays from jEdit? Nice to meet you.
Jarekczek
source share