Saturday, March 15, 2014

mqlicense unable to locate Java Program

In the recent WebSphere MQ version (v7.0.1.3 as of this writing) installation on Ubuntu 13.04, I have some difficulty issue in accepting the WebSphere license. The output shows that the JAVA program went missing. Below is the message being prompt for the missing JAVA program.
...

ERROR: No useable java programs at ./lap/jre/jre/bin/java 

ERROR:  Installation will not succeed unless the license
        agreement can be accepted.

        If the error was caused by a display problem,
        read the license agreement file  (LA_xx, where
        xx represents your language ) in the 'licenses'
        directory, and then run the following command:

            mqlicense.sh -accept

        Only use this command if you accept the license
        agreement.

        For other errors, contact your IBM support centre.
I find it interesting why the mqlicense shell script is looking for the JAVA program in ./lap/jre/jre/bin. My curiosity is leading me to dig into mqlicense.sh to find out what is going on to the script, and I found this piece:
...

# Set JRE location
  JRE=${JRE:-$(find $PROGPATH/lap -type d -name bin)/java }
  if [ ! -x ${JRE?} ]; then
    echo "ERROR: No useable java programs at ${JRE}"
    errormsg
    exit 1
  fi

...
I was so surprise that WebSphere isn't install the JAVA program in default location (/bin or /usr/bin). Anyhow I just change the JRE variable to suit my needs. Now the screen will turn out a license agreement page for me to accept. Once accepted, following message will be seen:
...
...

Displaying license agreement on :0

Agreement accepted:  Proceed with install.

2 comments:

Anand K Sade said...

May I know how you fixed the issue?

华歆 said...

Sorry, I haven't got any clue yet.