A Java Swing application for managing students, courses, marks, and generating report cards. Built with MVC + DAO architecture, styled with FlatLaf, and backed by MySQL via JDBC prepared statements.
SRMS provides CRUD screens for core academic entities and a Report Card view that computes SGPA per semester and overall CGPA. Tables include search/filter bars and sensible column widths. The UI uses a modern FlatLaf theme with a clean main menu and optimized forms.
Install and have the following ready before running the application:
- Java Development Kit (JDK) 17 or later
- Verify:
java -versionshould show 17.x or higher. - Ensure
JAVA_HOMEis set (optional but recommended).
- Verify:
- Maven 3.8+ (CLI)
- Verify:
mvn -vprints Maven version and Java home.
- Verify:
- MySQL Server 8.x running locally (or accessible remotely)
- Verify:
mysql --version. - Create and seed the database using
initialize_student_result_database.sql(see Initialize Database section).
- Verify:
- MySQL credentials available (e.g., user
root, passwordroot). - Internet access (first run) so Maven can download dependencies (FlatLaf, MySQL Connector/J).
- Git (optional) if you plan to clone or contribute.
- Fonts (optional aesthetic enhancement): Rubik Dirt (headings), Ovo (body).
Optional / Nice-to-have:
- A modern IDE (IntelliJ IDEA, VS Code with Java extensions, Eclipse).
- Printer configured (for printing report cards).
- CSV viewer (Excel, LibreOffice, etc.) for exported report data.
If running behind a proxy, configure Maven proxy settings in ~/.m2/settings.xml to allow dependency downloads.
java -version
mvn -v
mysql --versionAll commands should succeed without errors before proceeding.
If you are missing prerequisites, follow these guided steps (one clear method per tool). Use an Administrator PowerShell only when modifying system PATH.
- Go to https://adoptium.net/temurin/releases/?version=17 and download the Windows x64 MSI installer.
- Run the installer, accept defaults.
- After installation open a new PowerShell window and verify:
Output should show version 17.x.
java -version - Set JAVA_HOME (if not automatically set):
$jdk=(Get-ChildItem "C:\Program Files" | Where-Object {$_.Name -like "*Temurin*"} | Sort-Object LastWriteTime -Descending | Select-Object -First 1).FullName [Environment]::SetEnvironmentVariable('JAVA_HOME', $jdk, 'Machine') $env:Path += ";$jdk\bin" java -version
- Download the binary ZIP from https://maven.apache.org/download.cgi (e.g. apache-maven-3.x.x-bin.zip).
- Extract to
C:\Tools\maven(create folder if needed). - Add
C:\Tools\maven\binto PATH:[Environment]::SetEnvironmentVariable('Path', $Env:Path + ';C:\Tools\maven\bin','Machine')
- Open a new PowerShell and verify:
mvn -v
- Download MySQL Installer from https://dev.mysql.com/downloads/installer/ (choose the larger full installer if bandwidth allows).
- Run installer → at setup type choose "Developer Default".
- During configuration set a root password (remember it for
-Ddb.pass=). - Finish and launch MySQL Workbench to confirm connection. Service runs as
MySQL80. - (Optional PATH) Add MySQL bin (e.g.
C:\Program Files\MySQL\MySQL Server 8.0\bin) to PATH for CLI. - Import schema & seed data:
mysql -u root -p < "initialize_student_result_database.sql"
- Verify database objects exist via Workbench or:
mysql -u root -p -e "SHOW DATABASES;"
- Download from https://git-scm.com/download/win.
- Run installer; accept defaults (Enable Git from command prompt).
- Verify:
git --version
- Visit https://fonts.google.com/ and search for "Rubik Dirt" and "Ovo".
- Download each family (Download family button).
- Extract ZIPs; right‑click each
.ttf→ Install for all users. - Restart the application for font detection.
Run a compile to let Maven fetch dependencies:
mvn -Ddb.user=root -Ddb.pass=root compileIf you use a proxy, configure %USERPROFILE%\.m2\settings.xml with <proxies> before this step.
mvn exec:java "-Ddb.user=root" "-Ddb.pass=root"- Java version wrong: Open a new shell; ensure only one JDK path precedes others in PATH.
- Maven not recognized: Confirm
binpath added; reopen PowerShell. - MySQL auth failure: Re-enter password; reset via MySQL Workbench if forgotten.
- Port conflict (3306): Change port during MySQL configuration or stop conflicting service.
- Dependency download failure: Check internet access or proxy; retry
mvn compile.
- CRUD Forms: Students, Departments, Faculty, Courses, Marks, Results.
- Marks Entry: Auto-calculates totals and grade on save.
- Report Cards: SGPA per semester and overall CGPA; CSV export and printing.
- Search & Filter: Live row filtering in all tables.
- UI Polish: FlatLaf theming, accent color, rounded components, improved layouts.
- Keyboard/Mouse Friendly: Focused forms and responsive tables.
- Language: Java 17+
- GUI: Swing + FlatLaf
- Database: MySQL (Connector/J)
- Build: Maven (
exec-maven-plugin) - Architecture: MVC + DAO with JDBC prepared statements
src/main/java/model: POJOs (Student,Course,Marks, etc.)src/main/java/dao: DAOs for CRUD and queries (StudentDAO,MarksDAO...)src/main/java/ui: Swing forms and dialogs (MainMenu,ReportCardForm, etc.)src/main/java/util:DBConnectionthat reads DB settings from JVM propertiessrc/main/java/Main.java: Entry point, FlatLaf setup and app launch
SRMS reads DB settings from JVM system properties:
db.url(e.g.jdbc:mysql://localhost:3306/college_db)db.user(e.g.root)db.pass(e.g.root)
Ensure your MySQL instance has the required schema and tables. Seed some students and marks to see the Report Card in action.
Use the provided initialize_student_result_database.sql to create the database, tables, and seed data.
Option A — PowerShell (mysql CLI):
# If mysql is on PATH
mysql -u root -p < "initialize_student_result_database.sql"
# Or specify full path to mysql.exe (typical install path)
& "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe" -u root -p < "initialize_student_result_database.sql"
# Non-interactive (password inline). Use with caution.
mysql -u root -proot < "initialize_student_result_database.sql"Option B — MySQL Workbench:
- Open MySQL Workbench and connect to your server.
- File → Open SQL Script… → select
initialize_student_result_database.sql. - Click the lightning bolt (Execute) to run the script.
- Confirm the database and tables are created.
Run from PowerShell (Windows). Pass DB properties either before the Maven goal (preferred) or, if after the goal, wrap them in quotes.
Preferred (properties before goal):
mvn -Ddb.url="jdbc:mysql://localhost:3306/college_db" -Ddb.user="root" -Ddb.pass="root" exec:javaAlternate (properties quoted after goal):
mvn exec:java "-Ddb.url=jdbc:mysql://localhost:3306/college_db" "-Ddb.user=root" "-Ddb.pass=root"If your exec-maven-plugin requires explicit main class:
mvn -Ddb.url="jdbc:mysql://localhost:3306/college_db" -Ddb.user="root" -Ddb.pass="root" exec:java -Dexec.mainClass=MainClean build:
mvn clean packageFinal run command used in this project:
mvn exec:java "-Ddb.user=root" "-Ddb.pass=root"- Use the Reports menu to open
ReportCardForm. - If a student shows no marks, a hint with a button will open
MarksFormto add them. - Export report data with the CSV button or print directly.
For the intended look and feel:
- Headings: Install the "Rubik Dirt" font.
- Body text: Install the "Ovo" font.
On Windows:
- Download the fonts from Google Fonts (Rubik Dirt, Ovo).
- Double-click each
.ttfand click Install. - Restart the app to apply fonts.
The app falls back gracefully if fonts are not installed.
- No DB connection: Verify
db.url,db.user,db.passand that MySQL is running. - Maven properties ignored: Ensure properties are placed before the goal or quoted if after.
- Empty report: Add marks for the selected student via
MarksForm.
- PDF export of report cards
- Per-semester filters and transcript view
- Enhanced validation and error dialogs