Error in connecting to GTalk (connection Timed out)

Am using the following code to connect to GTalk. I copied the code from

a thread in the ‘igniterealtime’ forum. Unfortunately I lost the link

to that thread.

When I try running the code, it gives the error " [java.net|http://java.net.co/].ConnectException:Connection timed out: connect". Please let me where is it going wrong.I am behind a proxy, but am able to connect successfully when I use theGTalk client messenger. I have also attached the code.Am using Smack 3.0.4 ThanksAneez******************************************************************** Error Starts****************************************************************** **Starting IM clientXMPPError connecting to talk.google.com:5222.:remote-server-error(502) XMPPError connecting to talk.google.com:5222.-- caused by: [System.in|http://system.in.re/].read();

} catch (IOException ex) {

//ex.printStackTrace();

}

connection.disconnect();

}

}


Code Ends


I don’t think smack has support for proxies yet. You can try this http://www.igniterealtime.org/issues/browse/SMACK-226 but there was another thread that said they couldn’t get it working.

Is there any other way by which we can connect to GTalk ???

Am behind a proxy, and would like to know of a java library that could help me connect to GTalk and send messages to people on the friendlist