This is a simple peer-to-peer communication system developed in Java that allows multiple users to chat with each other over a Local Area Network (LAN). It uses sockets for network communication and multithreading to handle multiple clients simultaneously.
- Client-Server architecture
- Real-time messaging over LAN
- Multithreaded server to handle multiple clients
- User login with username/password
- Message Encryption
- Support Chat history
- Basic GUI using JavaFX
- Message display with sender highlighting
- Java (Core)
- Java Sockets
- Multithreading
- JavaFX (for GUI, optional)
- Compile:
javac Server.java - Run:
java Server
Make sure you have Java (JDK 21 or above) and JavaFX installed and configured in your environment.
- Compile:
javac Server.java - Run:
java Server
- Compile:
javac --module-path JarAssets/javafx-sdk-21/lib --add-modules javafx.controls,javafx.fxml src/Client.java - Run:
java --module-path JarAssets/javafx-sdk-21/lib --add-modules javafx.controls,javafx.fxml -cp src Client - Enter the Server IP, Password (if used), and Username
- Complie:
javac --release 21 --module-path JarAssets\javafx-sdk-21\lib --add-modules javafx.controls,javafx.fxml -d bin src\Client.java - Create Jar:
jar cfm src/Client.jar src/manifest.txt -C bin . - Run Jar File:
JarAssets\jre\bin\java --module-path JarAssets\javafx-sdk-21\lib --add-modules javafx.controls,javafx.fxml -jar src\Client.jar - Enter the Server IP, Password (if used), and Username
- File sharing support
- User authentication
- Private messaging
- UI improvements
This project is open-source and free to use for educational purposes.