Wednesday, November 9, 2011

WebSphere MQ - 'java' is not recognized as an internal... error message

Problem:
You might get the 'java' is not recognized error message when generating a binding for WebSphere MQ using JMSAdmin tool.

Example:
C:\...\WebSphere MQ\Java\bin>JMSAdmin < qm.scp

Running the batch file might give you the following error message:
'java' is not recognized as an internal or external command, operable program or batch file.

Solution:
Step 1: Open up your JMSAdmin batch file using notepad. It will look something like this.

Step 2: Find out the full Java path on your local machine. In my case the Java file is located in the following folder:
C:\Program Files (x86)\Java\jdk1.7.0_01\bin\Java

Step 3: Replace “Java” with your Java path from Step 2. Save the file.

Step 4: Run the JMSAdmin again. This time your binding is created.

No comments: