Installing MQ without a Java Runtime Environment or removing one already present
In IBM MQ releases prior to 9.0.2 the product always installed a Java Runtime Environment (JRE). This was tied into MQ in such a way that once installed, it could not be properly or safely removed without removing the whole of MQ. For some customers this had become a problem.
I should say at this point, for those reading who are happily using Java with MQ, that our Service team does update the installed JREs in every fix pack to keep your Java environment secure. In addition, for those security issues that are too urgent or do not come to light at a convenient time for inclusion in the next fix pack, our Service team will provide an ifix which replaces the entire JRE with the latest, fixed JRE level.
However, for some customers who were not actively using Java in their MQ environment, this seemed to be a risk they were not willing to take. Some even had company policies in place that discouraged or forbade them from installing more JREs. As a result of this, we received requests for enhancement from several customers and in MQ 9.0.2 we updated the installers to allow you to omit the JRE from an installation.
Linux Installer Changes
For the Linux installers, the main change here was to loosen the package prereqs so that GSKit RPM could be installed without installing the JRE RPM. (The Server RPM prereq on the JRE RPM had been removed a while back.)
All other prereqs were already in place to ensure that if you install an MQ component that is written in Java you will be required to install the JRE component as well.
Windows Installer Changes
If you do a typical install of IBM MQ 9.0.2 or later you will end up with an installation that *DOES* contain a JRE.
If you upgrade to MQ 9.0.2 or later from an existing pre-9.0.2 installation, the upgrade will add the Java Runtime Environment installable feature (as all installs prior to 9.0.2 had a JRE and an upgrade updates all the install features present, it would have made little sense to remove the JRE during an upgrade.) However, you can then modify the installation and remove the JRE, if you so wish.
If you do not wish to install the JRE at install time, you should choose the "Custom Install" option which can be found on the panel immediately following the license acceptance panel. You can choose installation name, installation description, and installation folder here or accept the pre-filled values which will give you the same selections as a "Typical Install".
You will then be presented with the feature selection panel which has a new item on it - "Java Runtime Environment":
As in a typical install, the Java Runtime Environment installable feature is selected. If you do not wish to install it, you can now deselect it. You can add or remove other features as you choose and when you click "Next >" the installer will check whether the features you have chosen are consistent. If they are not, you will get a panel something like this:
This is because it is not only user programs that may be written in Java. Portions of the MQ product itself are written in Java and can be run only by the JRE that MQ installs. As documented in the URL in footnote (1), these include:
- MQ Explorer
- Telemetry Service
- Managed File Transfer (Service, Agent, Logger and Tools)
- AMQP Service
- Web Administration
In the above example, amongst other features, the user had chosen to install MQ Explorer. However MQ Explorer is a Java application and without the MQ JRE, it cannot function.
These warning panels will stop you installing any MQ feature that you will be unable to run and must be resolved before the installation can continue. The features named cannot use another JRE but rely on the MQ JRE for the customisations it contains (like the enhanced IBM security providers) so the only way to satisfy them is to install the JRE. As the panel says, you must now decide which is more important to you: removing the JRE or installing the selected Java-based MQ features.
If you want to know what a given installable feature contains see footnote (4).
Removing an already-present JRE on Windows
Firstly, ensure that your installation is at MQ 9.0.2 or above. Although there was a JRE in MQ 9.0.1 and before, the installer had no knowledge of the JRE as an installable feature in its own right and therefore had no ability to uninstall it.
Launch the installer executable appropriate to the release of installation you wish to modify, select "Maintain or upgrade an existing instance" and select the installation to modify.
In the "Program Maintenance" panel select Modify.
Deselect the "Java Runtime Environment" feature and click "Next >".
If any features require the JRE you will be shown the "Requires 'Java Runtime Environment' (JRE)" panel as before. Proceed as described above.
Removing an already-present JRE on Linux
Firstly, ensure that your installation is at MQ 9.0.2 or above, then issue the command:
rpm -e MQSeriesJRE
If you get failed dependencies error(s) the listed RPMs will be the ones that require the persence of the JRE. Just like the Windows inconsistent features panel above, you now have to decide what is most important to you: removing the JRE or enjoying the functionality contained in the listed RPMs (3).
Running MQ without a JRE Installed (Windows and Linux)
Given that you cannot install the components or features that absolutely require a JRE without installing the JRE, there should be little disruption to the way you work. However, there are a couple of exceptions. In two areas the hard prereq checking is not performed as there is an alternative to installing the MQ JRE:
IBM MQ Classes for Java / IBM MQ Classes for JMS
These classes will run perfectly well with JREs other than the IBM JRE provided by MQ. The only (obvious) caveat being that if your application specifically uses IBM JRE extensions you will need an IBM JRE rather than an Oracle one.
The GUI usually used for managing certificates, "strmqikm" (ikeyman) is written in Java. If you did not install the MQ JRE you will have to use the text-based version of the program. "runmqakm". This is described in the Knowledge Center (2).
Hopefully you will find it simple to remove a JRE following the above instructions (and adding one back in is just as easy). If you have local policies about not installing JREs, it is probably a good idea to look up the features you want to use in the links given in the footnotes before you come to install the product and find MQ requires a JRE to do what you want it to do.
I am aware I have not covered Windows silent install here and this post is quite long already. That will have to be a topic for another day.
(1) For a full list of all the installable features that require you to install the MQ JRE, see table one on this page in the knowledge center:
(2) runmqakm (and the other variants) are described in the Knowledge Center at:
(3) If you need to know what is in a given RPM, see the Knowledge Center table here:
(4) Here are the descriptions of the Windows installable features in Knowledge Center: