Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Well - that was embarassing...

Jim

I simply downloaded a released JAR (e.g. https://repo.eclipse.org/content/repositories/paho-releases/org/eclipse/paho/mqtt-client/0.4.0/mqtt-client-0.4.0.jar) and stuck it in my classpath.

Then I wrote a simple client like:

import org.eclipse.paho.client.mqttv3.*;


public class Main {

public static void main(String[] args) throws Exception {

MqttClient c = new MqttClient("tcp://192.168.1.80:1883", "pzf");

MqttMessage m = new MqttMessage("Hello World".getBytes());

m.setQos(0);

c.connect();

c.publish("event", m);

c.disconnect();

c.close();

}

}



On 7 October 2013 20:54, Jim Veneskey <wrangler@xxxxxxxxxx> wrote:
I hadn't realized I was including my introductory message since GMail tends to hide it...

Oh well - a proper subject would have been "Could someone help a newbie setup Paho?"

And  yes - I changed that password ;-)

jim


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/paho-dev




--
Paul Fremantle
Part-time PhD student - School of Computing
twitter: pzfreo / skype: paulfremantle / blog: http://pzf.fremantle.org
CTO and Co-Founder, WSO2
OASIS WS-RX TC Co-chair, Apache Member
07740 199 729

Back to the top