I think you could use Java_Home system property or using Operating system platform system registry...
As an example: for Windows operating system you could change JavaSoft Registry Group through the following steps:
1. Start->Run
2. type regedit.exe
3. click on Edit Menu
4. Choose Find
5. search for "JavaSoft"
You will find all
java virtual machine prperties...