Please disable your adblock and script blockers to view this page

Search this blog

Showing posts with label Chat Client in Java. Show all posts
Showing posts with label Chat Client in Java. Show all posts

Thursday 30 May 2013

Add Custom Flash Chat in Oracle ADF Application

In this tutorial i am going to show that how can you add a custom flash chat in your ADF application, and use it to chat with friends.
this is very much simple, as no code required to do this.
  • Go to , this site provides free custom flash chat rooms, get html code of your custom chat from here
  • Create an html page using that code

  • <html>
    <!-- Begin Everywherechat Room Code -->
          <br />
         <script src=""></script> 
    <!-- End Everywherechat Room Code --> 

  • Now create a Fusion Web Application and create a page in it, call this HTML page in an inlineFrame (af:inlineFrame)

  • <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="" version="2.1" xmlns:af="">
      <af:panelGroupLayout id="pgl1">
        <af:inlineFrame id="if1" source="/chat.html" inlineStyle="height:700px;width:700px;"/>

  • Now Run your application and see your flash chat room is ready - Happy Coding

    Download Sample Application-Sample ADF Application

Tuesday 27 November 2012

GTalk (Google Talk) integration with Java

Hello All

Google Talk is most popular chat client that use your gmail login authentication, and after this tutorial you will be able to create your own Gtalk (if you use swing ), this tutorial shows how to integrate Gtalk with Java.

This example uses Smack API, Smack is an Open Source XMPP (Jabber) client library for instant messaging and presence. A pure Java library, it can be embedded into your applications to create anything from a full XMPP client to simple XMPP integrations such as sending notification messages and presence-enabling devices.

  • Code to integrate Google talk with java
 package chat_Server;
 import org.jivesoftware.smack.ConnectionConfiguration;
 import org.jivesoftware.smack.XMPPConnection;
 import org.jivesoftware.smack.XMPPException;
 import org.jivesoftware.smack.packet.Message;
 public class GtalkChat {
   private static String username = "";
   private static String password = "XXXXXXX";
   ConnectionConfiguration connConfig;
   XMPPConnection connection;
   public GtalkChat() throws XMPPException {
     connConfig = new ConnectionConfiguration("", 5222, "");
     connection = new XMPPConnection(connConfig);
     connection.login(username, password);
   public void sendMessage(String to, String message) {
     Message msg = new Message(to,;
   public void disconnect() {
   public static void main(String[] args) throws XMPPException {
     GtalkChat gtalkChat = new GtalkChat();
                "Hii this message is send using Java and Google talk integration.");
  • Change line 7 and line 8 with your username and password respectively

  • Chage line 27 with receiver's email id and type your message
  • Now download SMACK API from its website or click on link below
  • Extract Smack.rar and Add Smack.jar and Smackx.jar to your project
  • Now run the code
  • This code will only send chat , try to receive using your own code