java - The method createConnection() is undefined for the the class ConnectionFactory -
i have been trying learn activemq , jms. when compile following code above exception. although, have attached right jar files jms , activemq. eclipse asks me add cast connectionfactory object when try create connection (i.e. connectionfactory.createconnection()) using connectionfactory object. codes see everywhere on internet same have written. import javax.jms.connection; import javax.jms.connectionfactory; import javax.jms.deliverymode; import javax.jms.destination; import javax.jms.messageproducer; import javax.jms.session; import javax.jms.textmessage; import org.apache.activemq.activemqconnection; import org.apache.activemq.activemqconnectionfactory; public class jmsproducer { public static void main(string[] args) { try { // create connectionfactory connectionfactory connectionfactory=new activemqconnectionfactory("admin", "admin", activemqconnection.default_broker_url); // create connection connection co...