The JDBC URL, user and password come from .env in the project root (see
.env.example). Copy it once and edit the values:
Copy-Item.env.example .envFile > Open Folder...-> select this folder.- Install the Extension Pack for Java if prompted.
- Open
Main.java(not the files inreports) and click Run Java.
$jar = 'lib\mysql-connector-j-9.1.0.jar'
javac -cp $jar *.java reports\*.java
java -cp ".;$jar" Main├── Main.java main(), login loop, report menu, role lookup
├── reports/
│ ├── Reports.java dispatcher: picks the child report class
│ ├── Report.java abstract base (connection, HR gate, date prompt, run())
│ ├── PayStubReport.java report 1
│ ├── PayTotalReport.java abstract parent for reports 2 & 3
│ ├── PayByTitleReport.java report 2
│ ├── PayByDivisionReport.java report 3
│ ├── NewHiresReport.java report 4
│ ├── EmployeesByTitleReport.java report 5
│ ├── Employee.java
│ ├── PayStub.java
│ └── PayTotal.java
├── lib/mysql-connector-j-9.1.0.jar
├── .vscode/settings.json
└── .env / .env.example
From the main menu type reports to sign in with an employee ID and run a report.
Your original login keyword and its stub are unchanged.
- Employee pay statement history — General Employee
- Total pay for month by job title — HR Admin
- Total pay for month by division — HR Admin
- New employee hires within a date range — All Employees
- All employees grouped by job title — HR Admin