Using the ip didnt work.
XMPPConnection con = new XMPPTCPConnection ("127.0.0.1");
org.jivesoftware.smack.SmackException: javax.naming.NameNotFoundException: DNS name not found [response code 3]; remaining '_xmpp-client._tcp.127.0.0.1'
Using the code below, it worked.
ConnectionConfiguration config = new ConnectionConfiguration("localhost", 5222); | |||
config.setSecurityMode(SecurityMode.disabled); | |||
XMPPConnection con = new XMPPTCPConnection(config); |