Running multiple versions of Java on the same Windows machine
Posted by Travis Cox, Last modified by Peggie Wong on 06/24/2015 02:21 PM
Java is a very popular programming language and chances you have several applications that require Java. The problem is that different applications require different versions of Java. For example, you may have an older application that requires Java 5 where the Ignition client or designer requires Java 6 or higher. Of course you can use multiple versions of Java under Windows and different applications can use different Java versions. This article explains how to run multiple versions of Java side-by-side on the same Windows machine.
Order of Java Installations
First of all, the order in which you install the Java Runtime Environments is really important. You should install the JREs from oldest to newest in that order. If you install the JREs out of order, it is best to simply remove all Java installations, restart the machine, and install them from oldest to newest. This is giving the machine the best chance to recognize multiple Java versions.
Location of Java Installations
Each Java installation gets installed at:
where X represents the version of Java. So if you have Java 5 and Java 8 installed you will have to directories. Make a note of the different versions you have installed.
Java Browser Plugin
If your application runs in a web browser using Java's browser plugin, you can only have one version at a time. Ignition does not use Java's browser plugin so you can continue using an older version.
Running Existing Java Application
It is easy to specify which Java version you want to use when running Ignition's client. So, it is important to tell Windows to use your older version of Java by default. That way your existing application continues to run. To do this we need to set the Windows PATH variable to the correct version of Java. To find out which version is on the path right now simply do the following:
You will find either that no Java version is on the path or you will know which version is currently on the path. If the version found is the version required by your existing application you can skip down to opening Ignition's client. If not, we need to change the Windows PATH variable to put the correct Java version. Follow these steps:
Running Ignition Client
Ignition will try to use the correct version of Java automatically using the native client launcher. You don't want to use Java Web Start since you may have to change a few settings to get it to work. To use the native client launcher simply follow the steps below:
That is it! It is very possible to run multiple versions of Java on the same machine so you can run your existing applications and Ignition at the same time. You just need to make sure a few house keeping items are taken care of. If you have any questions or are experiencing any issues please contact our tech support.