Both of the examples you gave require the use of a server normally. There are many free IRC servers you can use to make a channel and then make a java client connect to them. ICQ I'm not so sure about.
I have jpilot for my web based client. Feel free to try it out at
http://www.web-techs.net/jpilot/chat1.html
Just change your nickname and click Connect. That's the (in)famous #Distributedcomputing chat that's been alive for going on 4 years now. We are using Jay Bergs server at ecompute.org (the guy that managed the Ecc2-109 prject that just finished.
Come on in and ask some questions if you want...
Joel "Doc" Hopper