Welcome to the Advanced Java course workspace. This repository contains three independent modern laboratory experiments consolidated into a single, clean Maven multi-module architecture running on cutting-edge Java 26.
lab01-modern-gui/: Desktop applications leveraging modern JavaFX (Declarative UI & Lambdas).lab02-database-orm/: Database persistence using PostgreSQL paired with Jakarta JPA / Hibernate 7.x.lab03-networking-threads/: High-concurrency network servers utilizing Java 26 Virtual Threads (Project Loom).
Ensure your local machine satisfies these requirements before launching the projects:
- Java Development Kit (JDK): Install JDK 26 or later.
- IDE: VS Code with the Extension Pack for Java installed.
- Database: A local instance of PostgreSQL running with a database named
university.
- Launch VS Code.
- Click File > Open Folder... and select the root
java-advanced-labsdirectory. - Wait for the Java extension to finish indexing the Maven projects.
Before running the database application, your PostgreSQL server needs an empty target database. Open your database console or terminal and execute:
CREATE DATABASE university;- Navigate to
lab01-modern-gui/src/main/java/com/edu/gui/ModernApp.java. - Click the Run button directly above the
mainmethod in VS Code.
- Ensure your PostgreSQL server is active.
- Update the credentials (
userandpassword) insideDatabaseApp.javato match your local setup. - Run the following command from the root directory inside your PowerShell window:
mvn exec:java -pl lab02-database-orm '-Dexec.mainClass=com.edu.db.DatabaseApp'
- Open a PowerShell window at the root directory and start the server:
mvn exec:java -pl lab03-networking-threads '-Dexec.mainClass=com.edu.network.ModernServer'
- Open a second separate PowerShell window and run the client to test concurrent connectivity:
mvn exec:java -pl lab03-networking-threads '-Dexec.mainClass=com.edu.network.ModernClient'
- Type text into the client console to see the lightweight virtual thread instantly process and echo back your request. Type
quitto disconnect safely.
To clean and compile all modules simultaneously from the command line, run this Maven command at the root directory:
mvn clean compile