f.setHostName("vmmachine"); //Change this to the name of the server running MQ
f.setPort(6969); //Change this accordingly too. Default is 1414
f.setQueueManager("QM_vmmachine"); // Queue Manager with this name needs to be pre-configured!
f.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
f.createQueueConnection().start();
} catch (JMSException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
e.getLinkedException().printStackTrace();
}