In response to David Carlson's answer, you can make it less brittle by using the java.home system property to locate the java executable instead of relying on the user's path to find it. In addition you should probably be redirecting standard input to the child process as well.