Академический Документы
Профессиональный Документы
Культура Документы
What is JAVA?
Java programming language (a highlevel, object-oriented programming language) Java Virtual Machine (a highperformance virtual machine that executes byte codes on a specific computing platform, typically JVM
Uses of JAVA
Java allows you to play online games, chat with people around the world, calculate your mortgage interest, and view images in 3D, just to name a few. It's also integral to the intranet applications and other e-business solutions that are the foundation of corporate computing.
Features of JAVA
Simple Security Portability Object oriented Multithreaded Dynamic Distributed
The concept of sending messages and letters has been reduced due to the new era of Internet Mailing. One such facility is being provided by the Chat Server
Chat
Chat is roughly described as a connection-oriented service, because a user establishes a connection and maintains that connection, sending and receiving text for the duration of the session.
Chat server is a stand-alone application that is made up the combination of two-application, server application (which runs on server side) client application (which runs on client side). This application is using for chatting in LAN. To start chatting you must be connected with the server , after that your message can broadcast to each and every client.
Existing System: It is limited to only two clients. The existing Chat Server System is only meant for transfer of messages from one client to the other. But the messages cannot be formatted and made attractive to look as well as graphical emotional pictures cannot be added to send the picture messages.
Proposed System
The proposed Chat Server is a chatting application that provides a good user interface with all the facilities of a chat application. Users have their user-id or Login name. User can communicate with any other user, who is online. User gets a list of online users. User can select any user and send a message.
What does the server and client do? Our server will be a stand-alone program -- a single Java process running on its own machine. It won't require any support software other than a Java virtual machine.
This application is used for receiving the messag es from any client and send to each and every cli ent and in this we can maintain the list of all online users.
*
After creating the ServerSocket it accepts the client socket and add this socket into arraylist.
After getting the client socket it creates a thread and make DataInputStream for this socket. After creating the input stream its read the user name and add it to arraylist and this arraylist object write in ObjectOutputStream of each client .
Firstly creates the login frame it consist one text field and the login button.
After hitting the login button it shows the next frame that Client Frame and it consist one text field for writing the message and one send button for sending it. And two list boxes, one is for showing the all messages and another list box is use to show the all user names. This frame has one more button that is Logout button for terminating the chat
In the client sides firstly creates a new socket and specifies the address and port of the server and establish the connection with the Server. Socket s=new Socket("localhost",1004);
After that client makes a new thread and DataInputStream, ObjectInputStream and DataOutputStream for sending the user name and retrieving the list of all users and add the all user name in its list box through iterator. Now we make one new thread for sending and receiving the messages from the server. It does this task by using DataInputStream and DataOutputStream. When the client is logged out it sends its name and message UserName has Logged out and terminate the chatting
This application is used for sending and receiving the messages but the message is shown to every client. Means this application is unable to provide the private chat facility it is like a multi party conference. Before running the client application make sure the server application is running. If server is not in running condition then you can not start the chatting.