You must generate a JNDI bindings file on the server machine, and then transfer it to the \bin subdirectory on the client machine.
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext. RefFSContextFactory PROVIDER_URL=file:/C:/JNDI-Directory
The following code provides an example of what you should see in the file.
set CLASSPATH=C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mqjms.jar; C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.jar; C:\Program Files\IBM\WebSphere MQ\Java\lib\jms.jar; C:\Program Files\IBM\WebSphere MQ\Java\lib\jndi.jar; C:\Program Files\IBM\WebSphere MQ\Java\lib\providerutil.jar; C:\Program Files\IBM\WebSphere MQ\Java\lib\ldap.jar; C:\Program Files\IBM\WebSphere MQ\Java\lib\fscontext.jar; C:\Program Files\IBM\WebSphere MQ\Java\lib\connector.jar echo + Creating script for object creation within JMSAdmin rem echo def qcf(psQCF) TRANSPORT(CLIENT) > ivtsetup.scp rem the following line to be used in place of above for mq client scenario echo def qcf(psQCF) TRANSPORT(CLIENT) HOST(SMEKA) PORT(1415) CHANNEL(ps_SRV_CHANNEL) QMGR(psQM) > ivtsetup.scp echo def q(psQ) qu(psQ) >> ivtsetup.scp echo end >> ivtsetup.scp echo + Calling JMSAdmin in batch mode to create objects java -DMQJMS_LOG_DIR="%MQ_JAVA_INSTALL_PATH%"\ log -DMQJMS_TRACE_DIR="%MQ_JAVA_INSTALL_PATH%"\ trace -DMQJMS_INSTALL_PATH="%MQ_JAVA_INSTALL_PATH%" com.ibm.mq.jms.admin.JMSAdmin < ivtsetup.scp echo + Administration done; tidying up files del ivtsetup.scp echo + Done! PAUSE