A secure messaging application with encryption, user authentication, and a chat interface.
Execute the SQL schema to set up the database:
File Location:
src/main/resources/schema.sql
Edit the database configuration file to match your MySQL credentials:
File Location:
src/main/resources/db_config.properties
Modify the following fields:
db.url=jdbc:mysql://localhost:3306/SecureChat
db.user=root
db.password=your_database_password # Change this to your actual MySQL passwordBefore running the application, compile the project:
- Navigate to the computer_security_project directory:
``cd computer_security_project``
- Clean and compile the project:
mvn clean compile
- Package the application:
mvn package
Run the server using:
mvn exec:java -Dexec.mainClass="com.computer_security_project.server.ChatServer"
Run the client using:
mvn exec:java -Dexec.mainClass="com.computer_security_project.client.ChatClient"
You can open multiple clients to chat with different users
If you encounter port conflicts, ensure that all instances use the same port number.
Files to Update:
- src/main/java/com/computer_security_project/client/ui/ChatUI.java
- src/main/java/com/computer_security_project/server/ChatServer.java
Modify the SERVER_PORT to the same value in all files:
private static final int SERVER_PORT = 5050; // Ensure this matches in all files