Chat application in J2ME

Hi, friends ๐Ÿ™‚ Today I am going to implement a chat application. Using this application you can chat each other if the two devices are in a same network. Actually the full application contains Chat Server and Chat Client. When one device runs the Chat Server application, another device can connect to that previous device by using Chat Client application. Here I am mentioning another important tool for developers. It is about GitHub a Version Control System. ย I have used it to host my source code because if I am going to put all the source code with in this post it is going to be theย lengthiestย post ever ๐Ÿ˜‰

The classes that I have used newly in this application but not in my previous applications are,

  • DataInputStream
  • DataOutputStream
  • Font
  • InputStream
  • InterruptedException
  • OutputStream
  • StringBuffer
  • StringItem

The interfaces that you will come across newly in these source codes are,

  • ServerSocketConnection
  • SocketConnection
Two apps
Figure 1

Let’s understand the scenario using the images. To chat, you need to devices. In my previous post I have shown you how to get two devices with your emulator. After you load the project, you can see two applications as in Figure 1.

First you have to run the Chat Server application (Figure 2). Because client need a running server to connect. When you are installed this application in to your mobile phone, make

Start the chat server
Figure 2

sureย you connect to a same network. The reason is, we are going to connect devices each otherย by the device IP address.

In the initial interface of the Chat Server application you can see two Items. They are StringItem and a Gauge. To run the server, press the Start command on the screen. Then it will display the device IP address as in Figure 3. Still you no need to run the Chat Client application.

Getting device IP
Figure 3

If you are not in an identified network the IP address you will get is 127.0.0.1 which means localhost. After you getting the server IP address, start the Chat Client application.

As the initial interface of the client application, you will be provided a space to type and sent the server IP address. That means you sent a request to the running chat server, that you want to connect to the opened port for initialize a chat. This

Send the server IP
Figure 4

isย a socket connection. You met a sms connection in the “send and receive SMS” blog post. Try to identify the differences by looking at the Connection String.

Figure 4 shows you the way that client enter the server IP address and sending the request to the server by pressing Connect command. When the chat client and chat server

Alert messages
Figure 5

connect each other successfully, you get Alert messages on both devices as in Figure 5. ย Now connections are ready and you also ready to chat ๐Ÿ™‚ Figure 6 shows the chatting interfaces of both client and server applications.

Anyone can start the chat because Alert message confirms that you two are connected. In my scenario, client starts the

Chatting interfaces
Figure 6

chat. So he types something in the given TextField and press the Send command as in Figure 7.

Then you can see the text sent by other party right below your TextField as in Figure 8. Next the server can send a reply to the client. Do these methods as long as you wish. ๐Ÿ˜‰ I have restricted the characters amount in one message to 160.

Send a chat by client
Figure 7

Therefore you cannot sent more that 160 characters in a single chat.

I did not handle the exceptions in this application. As an example I assume the client send the correct IP address that server shows in his screen. This complete application contains four files so I do not want to complex the code more. Another

Chat results
Figure 8

thing I have done in the source is, showing the exceptions that could throw by methods inย separately. I did that for learning purposes only. You can reduce the complexity of the code by putting all the exceptions in to one block.

Now it is better to jump to the source code. Here I have shown you just the Chat Server’s code. Other files I have uploaded to the GitHub and you can download them from there.

package anuMidSub;

import anuThreadSub.MessageReceiver;
import anuThreadSub.MessageSender;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import javax.microedition.io.Connector;
import javax.microedition.io.ServerSocketConnection;
import javax.microedition.io.SocketConnection;
import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.Gauge;
import javax.microedition.lcdui.Item;
import javax.microedition.lcdui.ItemCommandListener;
import javax.microedition.lcdui.Spacer;
import javax.microedition.lcdui.StringItem;
import javax.microedition.lcdui.TextField;
import javax.microedition.midlet.MIDlet;

/**
 * @author Anuja
 */
public class ChatServer extends MIDlet implements CommandListener, ItemCommandListener, Runnable {
    private Display display;
    private Form chatServerForm;
    private Command exitCmd;
    private StringItem ipStrItem;
    private StringItem startServerStrItem;
    private Command startCmd;
    private Form showIpForm;
    private Gauge gaugeItem;
    private Spacer spacerItem;
    private ServerSocketConnection serSocCon;
    private String deviceIp;
    private SocketConnection socCon;
    private DataInputStream is;
    private DataOutputStream os;
    private Form srvChattingFrm;
    private TextField chatTxtFld;
    private Alert infoAlert;
    private Command sendCmd;
    private String srvChatMsg;
    private MessageSender msgSenderClass;

    public void startApp() {
        display = Display.getDisplay(this);

        //-------------------------- Start chat server form --------------------
        chatServerForm = new Form("Chat Server");

        // \t use for getting tab space
        startServerStrItem = new StringItem("Start Chat Server \t", "Start", Item.BUTTON);
        chatServerForm.append(startServerStrItem);

        startCmd = new Command("Start", Command.ITEM, 8);
        startServerStrItem.setDefaultCommand(startCmd);
        startServerStrItem.setItemCommandListener(this);

        // Provide space as developer defined minWidth and minHeight
        spacerItem = new Spacer(200, 50);
        chatServerForm.append(spacerItem);

        // Continuous-running state of a non-interactive Gauge with indefinite range
        gaugeItem = new Gauge("Waiting for client... \n", false, Gauge.INDEFINITE, Gauge.CONTINUOUS_RUNNING);
        // Set layout position for this gauge item
        gaugeItem.setLayout(Item.LAYOUT_CENTER);
        chatServerForm.append(gaugeItem);

        exitCmd = new Command("Exit", Command.EXIT, 7);
        chatServerForm.addCommand(exitCmd);

        chatServerForm.setCommandListener(this);
        display.setCurrent(chatServerForm);

        // ----------------------- Show IP form --------------------------------

        showIpForm = new Form("Chat Server");
        ipStrItem = new StringItem("Client must connect to this IP: \n\n", "My IP \n");
        ipStrItem.setLayout(Item.LAYOUT_CENTER);

        // setFont() sets the application's preferred font for rendering this StringItem.
        ipStrItem.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_LARGE));
        showIpForm.append(ipStrItem);

        showIpForm.addCommand(exitCmd);
        showIpForm.setCommandListener(this);

        //------------------- Server chatting form -----------------------------

        srvChattingFrm = new Form("Server Chatting...");
        chatTxtFld = new TextField("Enter Chat", "", 160, TextField.ANY);
        srvChattingFrm.append(chatTxtFld);

        sendCmd = new Command("Send", Command.OK, 4);
        srvChattingFrm.addCommand(sendCmd);
        srvChattingFrm.addCommand(exitCmd);
        srvChattingFrm.setCommandListener(this);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }

    public void commandAction(Command c, Displayable d) {
        if(c == exitCmd){
            notifyDestroyed();
        }else if(c == sendCmd){
            // getString() gets the contents of the TextField as a string value.
            srvChatMsg = chatTxtFld.getString();
            // Send the chat to send() in MessageSender class
            msgSenderClass.send(srvChatMsg);
        }
    }

    public void commandAction(Command c, Item item) {
        if(c == startCmd){
            new Thread(this).start();
            //Alert alert = new Alert("Working");
            //display.setCurrent(alert);
        }
    }

    public void run() {
        System.out.println("Runnig");
        try {
            // ServerSocketConnection interface defines the server socket stream connection.
            // Create the server listening socket for port 60000
            serSocCon = (ServerSocketConnection) Connector.open("socket://:60000");
            System.out.println("Open the socket...");
        } catch (IOException ex) {
            ex.printStackTrace();
        }

        try {
            // Gets the local address to which the socket is bound.
            // The host address(IP number) that can be used to connect to this end of the socket connection from an external system.
            deviceIp = serSocCon.getLocalAddress();
            System.out.println("Get device IP...");
        } catch (IOException ex) {
            ex.printStackTrace();
        }

        showIpForm.append(deviceIp);
        display.setCurrent(showIpForm);

        try {
            System.out.println("Waiting for client request...");
            // Wait for a connection.
            // A socket is accessed using a generic connection string with an explicit host and port number.
            // acceptAndOpen() inherited from interface javax.microedition.io.StreamConnectionNotifier
            // Returns a StreamConnection object that represents a server side socket connection.
            // The method blocks until a connection is made.
            socCon = (SocketConnection) serSocCon.acceptAndOpen();
            System.out.println("Accepted and open the connection...");
        } catch (IOException ex) {
            ex.printStackTrace();
        }

        try {
            // InputStream is an abstract class and it is the superclass of all classes representing an input stream of bytes.
            // openDataInputStream() inherited from interface javax.microedition.io.InputConnection
            // openDataInputStream() Open and return an input stream for a connection.
            is = socCon.openDataInputStream();
        } catch (IOException ex) {
            ex.printStackTrace();
        }

        try {
            // OutputStream is an abstract class and it is the superclass of all classes representing an output stream of bytes.
            // An output stream accepts output bytes and sends them to some sink.
            // openDataOutputStream() inherited from interface javax.microedition.io.OutputConnection
            // openDataOutputStream() open and return a data output stream for a connection.
            os = socCon.openDataOutputStream();
        } catch (IOException ex) {
            ex.printStackTrace();
        }

        // Send our chat to other party
        // Initialization part have to doen begining caz Send command want to use the send() in MessageSender class
        // We pass the TextField as argement caz we want to clear the field before sent another chat
        msgSenderClass = new MessageSender(os, chatTxtFld);
        msgSenderClass.start();

        //clear();

        // Receive other party's chat and load our chatting interface
        MessageReceiver msgReceiverClass = new MessageReceiver(is, srvChattingFrm);
        msgReceiverClass.start();

        infoAlert = new Alert("Client connected successfully.");
        display.setCurrent(infoAlert, srvChattingFrm);
    }

    public void clear(){
        chatTxtFld.setString("");
        //msgSenderClass.start();
    }

    public TextField getChatTxtFld() {
        return chatTxtFld;
    }   
}

Just as I told you in my earlier posts, do not give-up by looking at the length of the code. Most of the lines contain comments explaining the technical aspect of using that class, methods, variables etc…

I have uploaded all the files in to GitHub including this. So you can follow this link and download the source code. Do not forget to read “ReadMe-Before-Download” file ๐Ÿ˜‰

Have a nice day.

Advertisements

About AnujAroshA

An undergraduate in the stream of ICT (Information & Communication Technology). A simple person :)
This entry was posted in J2ME examples. Bookmark the permalink.

61 Responses to Chat application in J2ME

  1. varun says:

    Hi Anuja,

    I do understand that you have uploaded the rest of the files in GITHUB but that’s chargeable if it possible for you can you send the files to mail id varun_hbti_gzb@yahoo.co.in or you can post here also.
    I’ll be very thankful to you really I need the code very urgent it’s really important for my Btech project

    Thanks,
    Varun

    • anujarosha says:

      Hi Varun,

      I can send you the files. But I would like if you download it from the GitHub because I like to see others using that facility also. It’s is not chargeable because it is an open source project. Just try once and if you unable to get it let me know. Thanks for using my code. ๐Ÿ™‚

  2. varun says:

    HI Anuja,

    I got your application code, but when I’m running it using eclipse IDE I’m able to start the services of Server but When I run the Client Applicaton I’m not able to type the IP address I would say I’m not able to wirte anything on mobile screen, it’s throwing NUll pointer expection . Let me what to do ???

    Below is the trace ::–

    Error occurred while dispatching event:
    java.lang.NullPointerException
    at javax.microedition.lcdui.TextField.validateCursor(+28)
    at javax.microedition.lcdui.TextField.keyEntered(+289)
    at javax.microedition.lcdui.TextField$InputMethodClientImpl.keyEntered(+8)
    at com.sun.midp.lcdui.EmulInputMethodHandler.endComposition(+37)
    at com.sun.midp.lcdui.EmulInputMethodHandler.keyTyped(+50)
    at javax.microedition.lcdui.TextField.callKeyTyped(+38)
    at javax.microedition.lcdui.Form.callKeyTyped(+52)
    at javax.microedition.lcdui.Display$DisplayAccessor.keyEvent(+223)
    at javax.microedition.lcdui.Display$DisplayManagerImpl.keyEvent(+11)
    at com.sun.midp.lcdui.DefaultEventHandler.keyEvent(+127)
    at com.sun.midp.lcdui.AutomatedEventHandler.keyEvent(+210)
    at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.handleVmEvent(+114)
    at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+57)

    Thanks,

    Varun

    • anujarosha says:

      Hi Varun,

      Are you trying with two simulators? If so check whether you have created them correctly. First try server application and then try client application separately. If those apps compile without error that means the problem may with your simulator. Have you used my code without changing ?

  3. El Buho says:

    Nice…
    This application support in mobile or not ? if support What type mobile can ?

    • anujarosha says:

      Hi,
      Yes this application support mobile devices and I have checked it with Nokia 5700 phone. When you compile your own code just check the profile and configurations attributes. They must match with your mobile which you are going to install this application.

      Good Luck…!!!

  4. El Buho says:

    I run this source code in netbeans 6.9 but it’s not working … in Emulator cant display the project ,what the wrong? Can u help me..
    and How to check the profile and configuration attributes please explain step by step ๐Ÿ™‚

    I’m sorry before , I’m a newbie in J2ME ๐Ÿ™‚

    • anujarosha says:

      Hey,

      First I will explain about the Profile and Configuration attributes. Theoretically, a Configuration is a specification that defines a JVM and a set of core-level APIs for a given set of similar devices. I am not going to describe about the Configuration in details because you can find what it is by Internet browsing. I will tell you how to give those attributes while you are creating a J2ME project in your NetBeans IDE. While creating a J2ME project you will find “Default Platform Selection” category as your third step. There you will find the options “Device Configuration” and “Device Profile” attributes. That is the place where you need to give the values. (Visit https://anujarosha.wordpress.com/2011/05/03/lets-learn-j2me-with-mobile-applications/
      to know how to create a J2ME project step by step)

      Then you will get a problem which values are we going to give for Configuration and Profile attributes. It’s depend on your mobile device. Check the mobile device manual or online which you are going to run this application for the values that you have for Configurations and Profile attributes. As an example, my mobile device is compatible with CLDC-1.1 and MIDP-2.0. Therefore I gave those values when I am creating this project in the NetBeans IDE. You can change those values even after you have completed the project also.

      Ah sorry… I forgot to tell you what Profile is. Think it is as a higher level API added to the configuration to provide all the good stuff for writing applications.

      The next thing you have to concern before running this both applications at once, is how to get two separate simulators. That means the Server run on one simulator while the client run on the other simulator. To learn about that, please visit https://anujarosha.wordpress.com/2011/07/20/how-to-send-and-receive-sms-in-j2me/

      I think now you have clear understand how to solve your problems. If you get any error messages in the code, please post the error message and how you got that error. Because there is no error in the code and I have checked it with simulator as well as with a real mobile device.

      Thank you for asking questions and please don’t hesitate to contact me if you get any further questions ๐Ÿ™‚

      • El Buho says:

        I’ve little bit understand now what is the attribute n profile ..thanks you.. ๐Ÿ™‚
        but in my netbeans cant display such as in image ‘figure 1’ chat server n chat client cant display in my emulator… just blank…

    • anujarosha says:

      Hey,

      Are you sure that you have written both Client and the Server application and Clean and Build them? If you have just one MIDlet, it won’t display like in “Figure 1” because it loads the application directly when you launch it. In this blog itself you just have the Chat Server application only. The Chat Client application I have upload to GitHub and I have put the link in the last paragraph for you guys to download. Have you visit that link and try to download it? Tell me how many MIDlets do you have in your code sample?

      Let’s try to solve this problem. ๐Ÿ™‚

  5. El Buho says:

    yes… I solve it..thanks u… ๐Ÿ™‚
    Do u have any android source code? Maybe Chat apps or anything else? ๐Ÿ˜€
    Have yahoo messenger?

    • anujarosha says:

      Congratulations ๐Ÿ™‚
      Yes I have done some Android applications. But I first try to publish only some J2ME applications in my blog then move to Android. I am hoping to implement another 3 or 4 applications from J2ME and I will definitely start Android applications.

      Yes I do have Yahoo messenger. But I mostly use GTalk and Twitter. If you wish you can join me there ๐Ÿ™‚

  6. El Buho says:

    Can u explain how to make android apps in Netbean 6.9?
    I dont have Twitter :D, but I’ve GTalk : Blackid.nif08
    or my YM : Blackid_nif

  7. El Buho says:

    Sorry…I’ve a question again… Is this apps can send chat in two phone ? example ,in my Nokia 6120 I use server and my N70 use client..its can work? send receive message?

    • anujarosha says:

      Hey Buho,

      Yes, definitely this app can send and receive chat in two phones. The only thing that require is both phones should have connect to a common network. As an example you can check this by activating Bluetooth on both phones. Then start the Server app in one phone. You can see an IP address of the mobile phone which runs the Server application. Then the other phone which is in the same Bluetooth network can act as the Client and connect with the Server IP address. It is just like connecting two computers in a LAN and talk to each other.

      • El Buho says:

        I already turn on all bluetooth in my two phone…then I open serverchat ,I click start and the IP show 127.0.0.1 and I try the second phone as client to connect,but ….cant connect…what’s wrong? ๐Ÿ™‚

    • anujarosha says:

      IP address 127.0.0.1 means the device has not connected to any network. This is the local IP address of the device. That’s the reason the other phone (Client) cannot ping to the Server. Try to send an image among your phones via Bluetooth. If it works that means your phones connected each other via Bluetooth correctly. Don’t disconnect the Bluetooth connection, then try the Server app again. If you still get the same localhost IP, let me know.

      Good Luck ๐Ÿ™‚

      • El Buho says:

        yeah still same IP … How to setting to connect the bluetooth each other? (N70 to 6120) maybe set device manager too?

    • anujarosha says:

      First make sure you don’t get any compile time error or run time error in the code. Then try to connect your laptop with a phone. Run the Server application in your laptop and Client app in your mobile phone.

      *** Important: Both device should connect via Bluetooth till the whole process complete ***

      If still not working, try to give a different port number
      “serSocCon = (ServerSocketConnection) Connector.open(“socket://:60000″);”

      Post me the updates of the progress.

  8. El Buho says:

    Hey … Can u teach me how to make RMS like inbox,draft,and sent item,deleted item?(j2me) ๐Ÿ™‚

  9. Rehan says:

    Hey bro can u forward me the codes for the client server..I’m unable to access the files in GITHUB. Please forward me at t_apil@hotmail.com. Thanks in advance ๐Ÿ™‚

  10. Rehan says:

    Thnks bro ๐Ÿ™‚ got it ๐Ÿ™‚

  11. Nabin says:

    hi anujarosha
    I want a chat application for me and my frn only.. how can i make that type of application for mobile using a website. I do own a website. please help me in coding. I have netbeans and want to develop app for that.

    • anujarosha says:

      Hi Nabin,

      Sorry for the late reply. Enjoyed the dawn of 2012 ๐Ÿ˜‰

      You are asking a way to send chat from web to phone. I haven’t implemented such application yet. What I can guess is, use an available, but uncommon socket to communicate with the App. It has a different mechanism when we are chatting in the web. You have chosen a wrong post to ask your question… buddy ๐Ÿ™‚

  12. Rahul Kumar says:

    I run this source code of Chat application in j2me in eclipse but itโ€™s not working โ€ฆ the show the error MessageSender Class it not define your source code plz tell me how to run the this code..

    • anujarosha says:

      Rahul,

      Please read the post carefully. Just copying the source and paste it in your IDE will not complete the project. In the post I have shared a link to all the source codes related to this project. Go through it.

  13. Rahul Kumar says:

    I run this source code of Canvas Class but your ImgCanvas and MyCanvas in Eclipse itโ€™s not working โ€ฆ in Emulator cant display in the project ,what the wrong? Can u help me..(J2me)

  14. mary says:

    Hi anuj
    I tried your chat app.. its working good.. thanx a Lot…
    how to chat between a pc and a mobile??? do u hav code fr tat?? pls do reply

    • anujarosha says:

      Hi Mary,

      You are welcome ๐Ÿ™‚
      I think we can do that because we are connecting through a socket and both devices are in the same network. Have to test it first :-/

  15. Pradeep says:

    Hey anuj…
    Can you tell me how to create a folder and copy d contents into it..and also d process of deleting em using J2me

  16. Rey Anthony Lumanta says:

    Hi sir, good day to you, I tried to test your program and it turn out that I will not run. Maybe there’s something wrong the way I transfer your code to my project. I just want to test and see the result because I’m still a newbie here in javame. Sir, is it okay if you can please send me a compiled .jad and .jar if its ok the whole project to my email add so that I can study it?
    reylumanta@gmail.com

    I will consider your help as one of my inspiration in learning java me. god bless.

    • anujarosha says:

      Hi Anthony,

      I have uploaded the whole project in to GitHub and also gave the link in the post. So you can create a jar file by yourselves. If you get any errors with my code, please post it as a comment. Then I can look at it. But I uploaded even after testing with real devices.

      Good luck…!!!

  17. Rey Anthony Lumanta says:

    Sorry for the clerical error, what i mean it will not run, it will not execute. Thanks.

  18. Mukesh says:

    I Think it is thats what i am looking for.. ๐Ÿ˜‰
    xmpp jabber ๐Ÿ˜ฆ

  19. dharan says:

    hi ..
    hey we r doing final year project on “Extending bluetooth over ip network”. we used “Sun Java Wireless Toolkit” and did code in j2me. we are not able to connect two emulators even if the systems r connected wirelessly. we gave correct ip address of the machines in the code and the code works well in a single machine but not in different machines. server side says”waiting for connection”.in client side it shows “first run the server midlet class”.can u suggest us how to connect 2 machines ?

  20. collins says:

    thanks so much for this wonderful project, please is it possible to link the chat server to a database and only registered member can have access to the chat with unique username and password..

  21. Taz says:

    Thank you so much for the code. I am just wondering, does this code allow 2 client emulator to connect with the chat server? if not, how do i do it?

  22. yacine says:

    my probleme is I got your application code, but when Iโ€™m running it using eclipse IDE Iโ€™m able to start the services of Server but When I run the Client Applicaton Iโ€™m not able to type the IP address I would say Iโ€™m not able to wirte anything on mobile screen, itโ€™s throwing NUll pointer expection . Let me what to do ???

    Below is the trace ::โ€“

    Error occurred while dispatching event:
    java.lang.NullPointerException
    at javax.microedition.lcdui.TextField.validateCursor(+28)
    at javax.microedition.lcdui.TextField.keyEntered(+289)
    at javax.microedition.lcdui.TextField$InputMethodClientImpl.keyEntered(+8)
    at com.sun.midp.lcdui.EmulInputMethodHandler.endComposition(+37)
    at com.sun.midp.lcdui.EmulInputMethodHandler.keyTyped(+50)
    at javax.microedition.lcdui.TextField.callKeyTyped(+38)
    at javax.microedition.lcdui.Form.callKeyTyped(+52)
    at javax.microedition.lcdui.Display$DisplayAccessor.keyEvent(+223)
    at javax.microedition.lcdui.Display$DisplayManagerImpl.keyEvent(+11)
    at com.sun.midp.lcdui.DefaultEventHandler.keyEvent(+127)
    at com.sun.midp.lcdui.AutomatedEventHandler.keyEvent(+210)
    at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.handleVmEvent(+114)
    at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+57)

    Thanks,

  23. Chris says:

    Thankx Anu! I really blame my self for finding ur blog really this late…i was just crawling all over net in search of mobile app development!(chat app precisely). My question is dis, using the steps above, could one develop a mobile messenger with features lyk chatroom etc?

    • anujarosha says:

      Hi… Chris…

      In short and sweet, the answer is “yes”. For a sample app, what you need is, devices should connect to a same network, should available the port that we are using in our application (According to the example it is “socket://:60000”).

      This is just a hint. Sorry, little bit busy with my work so can’t post a code on that right now ๐Ÿ™‚

      • Christian says:

        Hello sir, I am really tired about j2me, I have tried alot but there is no material for me to learn it.I really want to learn j2me. My email is xtcomweb@gmail.com you can help me i will be very grateful.

  24. Chris says:

    No problem, this reply alone indicates thats theres light at the end of the tunnel! Let me start with the steps u’ve posted! Thanks a lot!

  25. Chris says:

    Hi Anu…this question might seem stupid, but im a big novice in j2me programming, I have managed to download the client and server files you uploaded at github! What do I do next? Would I need to compile them to .class?

  26. filipe says:

    nice work ,thank you…this help me a lot.keep up

  27. vaibhav says:

    MessageReceiver msgReceiverClass = new MessageReceiver(is, srvChattingFrm);that is not defined in any package please help me have add extra jar file in j2me

  28. Vineet says:

    Hi bro ,
    Your chat app is very nice i run your app in netbean IDE 7.1 its work good but when i run the same jar file in my phone (nokia C2-03) then it run and when i start chat server then it throw Application error (Null Pointer Java/lang/NullPointerException) so please help me………where is the problem

  29. itrocks says:

    hi anujarosha
    you have this type of chat application for android os. then please send me the code for this.

  30. gerald says:

    Hey can u temme how i should convert these files to jar & use them in my cell?

  31. liz says:

    hello anuj could send me the code to my mail freash_20@hotmail.com what happens esque donot use github

  32. Chithraa says:

    hiiii sir …am chithraa …… I got an error wen i execute the code …..Many f the users commented that they got the o/p so mistake s in my side …..I executed dis code in 2 packages anuThreadSub and anuMidSub but i get an error that Package anuThreadSub does not exist and it cannot be imported …Pl give a solution sir ๐Ÿ˜ฆ ๐Ÿ˜ฆ ๐Ÿ˜ฆ sorry if its a dumb question …… Thank You ๐Ÿ™‚

  33. jigar says:

    Hi sir, good day to you, I tried to test your program and it turn out that I will not run. Maybe thereโ€™s something wrong the way I transfer your code to my project. I just want to test and see the result because Iโ€™m still a newbie here in javame. Sir, is it okay if you can please send me a compiled .jad and .jar if its ok the whole project to my email add so that I can study it?
    jigarthacker26@gmail.com

  34. lopianon says:

    bro. i didnot find the file in github. please help

  35. Kunti says:

    how to use wifi in j2me

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s