The XMPP Core and XMPP IM both support openfire which is an instant messaging server that's written in Java.
Yes Yes XMPP Core XMPP IM Openfire (previously known as Wildfire, and Jive Messenger) is an instant messaging (IM) and groupchat server for the Extensible Messaging and Presence Protocol (XMPP). It uses written in Java and licensed under the Apache License 2.0. 
