AnsweredAssumed Answered

simple smack problem

Question asked by wbb on Jul 7, 2017
Latest reply on Jul 9, 2017 by wbb

now I want to wirte a simple exmple with smack. but fail. I very sadly.   can you help me?

below is my java program, and it's will throw nullpoint exception when runing.

public class App

{

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

    {

        XMPPTCPConnectionConfiguration.Builder configBuilder = XMPPTCPConnectionConfiguration.builder();

        configBuilder.setUsernameAndPassword("test", "test");

        configBuilder.setXmppDomain("jabber.org");

        configBuilder.setHost("10.15.233.144");

        configBuilder.setPort(5222);

        configBuilder.setConnectTimeout(30000);

       

        AbstractXMPPConnection connection = new XMPPTCPConnection(configBuilder.build());

        connection.connect();

        connection.login();

        connection.disconnect();

    }

}

Outcomes