Simple client–server chat system built with Java and a JavaFX client.
- JDK 17+ (or the Java version you use)
- Maven
- make (GNU Make)
The repository includes a Makefile that provides convenient targets to build and run the server and client.
Use the Makefile targets from the project root.
# Build and run the server (uses mvn exec:java)
make run-server
# Build and run the JavaFX client (tries javafx:run, falls back to exec:java)
make run-client# Build/package server
make package-server
# Build/package client
make package-client# Run the most recently created server jar (from target/ or server/target)
make run-server-jar
# Run the most recently created client jar
make run-client-jar# Clean build artifacts (runs mvn clean)
make cleanYou can override the main classes or the mvn command on the fly:
# Run server using a different main class
make SERVER_MAIN=com.example.chat.CustomServer run-server
# Use a custom mvn (example: add -DskipTests)
make MVN='mvn -DskipTests' package-serverIf you prefer not to use make, here are the direct Maven one-liners equivalent to the Makefile targets:
# Run server directly with Maven (single command)
mvn -Dexec.mainClass="com.example.chat.server.App" exec:java
# Run client (JavaFX)
cd client && mvn clean javafx:run