Quiero hacer una conexión a talk.google.com con el protocolo xmpp con la libreria smack mediante java (netbeans especificamente), pero me marca errores este es mi código
public static void main(String [] args) throws Exception
{
XMPPConnection connection = conect("talk.google.com",5222,"[email protected] om","******","gmail.com");
System.out.println("Conectado");
}
public static XMPPConnection conect(String host, int port, String user, String password, String serviceName) throws Exception
{
ConnectionConfiguration connConfig = new ConnectionConfiguration(host, port);
XMPPConnection connection = new XMPPConnection(connConfig);
connection.connect();
connection.login(user, password);
return connection;
}