我试图从 Java 代码( 在我的本地机器中) 的队列中插入一条信息 。 我得到了错误 :
不满意LinkError:在java.library.path中没有mqjbnd05。
这是我的代码:
qMgr = new MQQueueManager(qManager);
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT ;
MQQueue queue = qMgr.accessQueue("Q1",openOptions);
MQMessage msg = new MQMessage();
msg.writeUTF("this is a test message");
MQPutMessageOptions pmo = new MQPutMessageOptions();
queue.put(msg, pmo);
MQMessage retrievedMessage = new MQMessage();
retrievedMessage.messageId = msg.messageId;
MQGetMessageOptions gmo = new MQGetMessageOptions();
queue.get(retrievedMessage, gmo);
String msgText = retrievedMessage.readUTF();
System.out.println("The message is: " + msgText);
queue.close();
qMgr.disconnect();
My Queue Manager is QM_FORD
and queue name is Q1. Listener port is 1414.
The environment variables are set properly.
Can anyone please guide me on this?