This article describes how to prevent the 'Java_Home' environmental variable in not defined message from appearing in the Package Error Log or Windows Event Viewer.
1. Connect to the server producing the above error and navigate from the Start Menu to Computer. Right-click Computer and select Properties.
2. Using the Control Panel's System window select Advanced System Settings and then Environmental Variables... from the System Properties window.
3. Under System Variables select the New... button and in the variable name: textbox type JAVA_HOME and set the path to the C:\Program Files (x86)\Java\jre7\bin folder. Afterwards click OK to close the window and create the variable.
Note: Depending on the Java version maybe jre7 or jre8. If Java is 64 bit then the installation folder can be found in Program Files not Program Files (x86)
4. When convenient reboot the server for the changes to take effect.