Coders Packet

Chatting Between 2 desktop/CMD using Java

By Rishabh Rajput

This Project is developed using Java Programming language by implementing networking, TCP and sockets for chatting between two Desktop/CMD.

This program is developed using Java programming language in which there are 2 files Client and server. Programmer can chat between two desktops by entering the IP address of another Desktop. This project can be used in creating a Chatting windows/applications. 

In this program Server should be run first, then the client can be run properly.

If this is running on only one desktop then 2 CMD is required. In one CMD server would be run then the client would be run in another CMD. There is a default username =ABC and password=XYZ is entered but If a programmer wants to change the username or wants to connect with the database they can do it. Programmer can use this project for preparing a chat windows/ Application. In this program the concept of TCP, Socket, Networking is implemented.


By using the following method user can run this program:-

1. Open CMD

2. Go to the folder

3. javac

4. java TCPServer


Then user has to open another CMD for the Client Side:- 

1. Open CMD

2. Go to the folder

3. javac         (User can Compile both files in one CMD also.)

4. java TCPClient


Then In server Side User have to enter Username "ABC" and Password "XYZ".

The CLient side connection would be closed if Bye is typed And Server connection would be closed after typing of "EXIT".

Download Complete Code


No comments yet