I want to make a connection & send a string to MQ using JAVA.
Following are the MQ details.
I am new to this, so can you please help me with sample code for this. Thanks!
There are two different APIs you can use to send an MQ message using the Java language. You can use the MQ Classes for Java and you can use the JMS API.
Since you mention JNDI, I suspect you mean the JMS API. However, I will answer for both. You sound like you want some sample code. The IBM MQ product supplies you with sample code to look at.
For the MQ Classes for Java, I suggest you look at <wmq-installation-directory>\Tools\wmqjava\samples\MQSample.java - that's the "Hello World" app for the Java classes.
For the JMS interface, I suggest you look at <wmq-installation-directory>\Tools\jms\samples\JmsProducer.java
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With