This is a simple Team Chat written in Java for a school project. Multiple Clients can connect with a server and send messages. The Server receives the messages and send them back to all connected clients.
Fast Chat is a multi-threaded Server-Client implementation, where multiple clients can connect to a server and communicate all together.
In order for this App to work, there must be a server running in the background, so that clients can connect to. The server uses the Machine's Local IP Address and Port: 4, so clients must know this IP Address in order to connect.
The server is Mutli-Threaded A thread listens to connections and a ClientHandler handles the connections. The way it Works is simple. The server starts a Listener thread that waits clients to connect. Every time a client connects then the server passes the client's socket to ClientHandler. ClientHandler controls the ServerReceiver and the ServerSender. ServerReceiver listens to messages coming from clients and puts them in a queue. ServerSender takes messages from the queue and sends them to every connected client.
Clients can connect to server via the Application's GUI. Clients can send message and receive the Name of the client who send the message, the message and the time the message was sent. Clients can connect and disconnect as long as the server is running.
- A Very simple and easy to use Graphical User Interface (GUI)
- A Multi-threaded server that automatically configures the server's settings.
- All clients are connected.
- The chat can be exported as PDF! The file is created in the user's **Download"" folder as chat.pdf
This app was written with jdk-11.0.2. Also it uses javafx-sdk-11.0.2. Additionally, it uses Apache PDFBox library to convert text to PDF. This library is uploaded in the project's folder.
-- Steps
-
Download jdk-11.0.2 Download here
-
Download javafx-sdk-11.0.2 Download here
-
Import the app to Eclipse or Intellij.
-
Go to Project Structure and add jdk-11.0.2 and javafx-sdk-11.0.2. This link can help you setup javafx-sdk Documentation
-
Add Apache PDFBox library to the project.
-
Compile and Run Server.java javac servers/Server.java
java servers/Server
- Run FastChatMain.java as a client from any machine.
Important: You will need to know the host's IP (The IP of the machine that runs the server) in order to get this to work.