Installing the server JRE on Windows
Choose the Windows x64 edition. Once downloaded, unzip the content to a temporary folder on your server.
Create the folder C:\Program Files\Oracle Java Server on your server.
Browse to the expanded content in your temporary folder. Go one level deeper e.g. jdk1.8.0_XX (where XX is the current update version) and copy this content to the new folder on your server.
md "C:\Program Files\Oracle Java Server" xcopy D:\Temp\jdk1.8.0_31*.* "C:\Program Files\Oracle Java Server" /s
(Make sure you change the update version number as appropriate).
Set JAVA_HOME environment variable
Finally we need to set an environment variable to point to our new Java installation:
- Open the control panel and choose the system applet
- Click the Advanced tab and the button Environment Variables
- Click New... at the System Variables
- Use JAVA_HOME as the name of the variable and the path C:\Program Files\Oracle Java Server as the value.
- Finish this job by clicking OK until your are back at the control panel.
Or using the command line:
setx JAVA_HOME "C:\Program Files\Oracle Java Server" /m
To check the environment variable has been set correctly:
- Open a new command prompt, type set and hit enter
- Scroll until you see the variable JAVA_HOME
It is important to keep Java updated with the latest security patches. To do so, simply Stop your Tomcat-Service and repeat the installation steps from above, overwriting the existing files. Don't forget to re-start Tomcat after the update.