I only occasionally work with Java, and when I do I'm consistently amazed at how horrible it is, both as a language and as a software ecosystem. On any given machine, you're bound to have multiple JRE's, and you have to go digging through environment variables to figure out which one is in use. Unless of course the application is explicitly using whatever JRE it feels like behind the scenes. Which it probably shipped with. It's just a horrible situation, reminiscent of going through the registry trying to get out of dll hell. How Java is so
so popular is a mystery to me.
Here's nice example that has a sort of poetic quality about it, as if it can't identify itself to itself, and so it gives up until someone can come along and give it a context for understanding itself:
"Could not determine the process id of the java process. Changing the IBMWAS6Service - WEBi_Server service status to the "stopped" state. To prevent this error, try recreating this service with the -logRoot parameter. The value of the logRoot parameter should be the directory in which the server's .pid file is created."

I was lucky -- I figured out that error was actually the result of multiple applications running as services (windows box) somehow competing for the same Java resources (Websphere, as usual, was a culprit here). This seems to be what "could not determine the process id of the java process" is complaining about, but good luck figuring that out. So if you ever find yourself with an error like this, ignore the bit about recreating the service, and instead try to determine what other java applications are running, and systematically stop them until you can bring your application up.