A Chat application built with java RMI and MySql database
This is a project to build a client-server chat application using java RMI and MySql
The directories included in this repo:
- ChatServer: The eclipse project directory
- ClientSide: all code for the client chat (GUI and console mode)
- ServerSide: all code for the MySql RMI server
- database: a MySQL database backup script (ChatDB.sql)
- Clients login to the system with a username and a password (sign in)
- Clients can create a new account by giving a username and a password (sign up)
- Clients can send a broadcast chat message (chat room discussion)
- Clients can send a private message to connected clients
- Server maintains a connected users list and registered users list
- Server stores the chat history and account informations of each client
- Online users list is updated for all clients when users join or leave the chat
- Registred users list is updated on a new client subscription
- Users receive real-time notifications about new incoming messages
- MySql database
- Java JDK8 (with JavaFX or OpenJFX) and RMI
- Apache Ant(TM)
- Create the MySql database from the backup script ChatDB.sql in database directory
- Inside ServerSide directory:
- build the server files using ant:
sudo ant
- launch the chat server on the default LAN (localhost)1:
sudo ant -emacs -Duser="databaseUser" -Dpass="databasePassword" run
- to launch the server on a precise network you need to provide ip_address2:
sudo ant -emacs -Duser="databaseUser" -Dpass="databasePassword" -Dip="ip_address" run
- Inside ClientSide directory:
- build the client files using ant:
sudo ant
- launch the chat client in console mode on the default LAN (localhost)1:
sudo ant -emacs run
- to launch the client in console mode on a precise network you need to provide ip_address2:
sudo ant -emacs -Dip="ip_address" run
- launch the chat client in GUI mode on the default LAN (localhost)1:
sudo ant -q runGUI
- to launch the client in GUI mode on a precise network you need to provide ip_address2:
sudo ant -q -Dip="ip_address" runGUI
1: server and all clients have to run on the same machine
2: ip_address corresponds to server machine's ip address on the network (common to the server and all clients)