A JavaFX 17 desktop application for booking boat ride tickets for the Honnavar and Kasarkod tenants, with thermal printing, database storage, and Excel export.
| Feature | Details |
|---|---|
| User Authentication | Login with username/password and role-based access |
| Customer Details | Name + 10-digit Contact Number |
| Passenger Count | Spinner (1β50 people) |
| Ride Duration | Radio buttons: 1 Hour (βΉ1500) or 2 Hours (βΉ2500) |
| Life Jackets | Mandatory, βΉ10 per person |
| Parking | Optional checkbox with vehicle types |
| Vehicle Types | Car βΉ20 Β· Bus βΉ50 Β· Tempo Traveller βΉ35 |
| Boat Assignment | Search and select from registered boats/drivers |
| Live Fee Calc | Total, Driver Amount, Counter Amount update instantly |
| Thermal Printing | Direct print to thermal printer + console preview |
| Database Storage | SQLite for ticket and boat data |
| Excel Export | Backup tickets to Excel file |
| View Tickets | List today's issued tickets |
| Fee Split | Driver: Boat + Jackets; Counter: Parking |
- Java 17 (JDK 17+)
- Maven 3.8+
- IntelliJ IDEA (Community or Ultimate)
File β Open β select the BoatTicketSystem folder
IntelliJ will auto-detect the pom.xml and import dependencies.
The first run downloads JavaFX 17, SQLite JDBC, Apache POI, and other libraries (~10-15 MB total).
- Option A (Maven): Right-click
pom.xmlβ Run Maven βjavafx:run - Option B (Main class): Open
MainApp.javaβ click the green βΆ Run button - Option C (Run Config): The
.idea/runConfigurations/BoatTicketSystem.xmlis pre-configured
The app starts with a login screen. Default credentials are admin/admin (or check DatabaseManager for setup).
--add-opens javafx.graphics/com.sun.javafx.application=ALL-UNNAMED
Go to: Run β Edit Configurations β VM Options
BoatTicketSystem/
βββ pom.xml β Maven dependencies
βββ build-exe.bat β Build script for creating executable
βββ src/
β βββ assembly/
β β βββ distribution.xml β Assembly descriptor for packaging
β βββ main/
β βββ java/
β β βββ module-info.java β Java module descriptor
β β βββ com/boatticket/
β β βββ MainApp.java β Entry point
β β βββ controller/
β β β βββ BookingController.java β Booking UI logic
β β βββ db/
β β β βββ DatabaseManager.java β SQLite database operations
β β βββ model/
β β β βββ Ticket.java β Ticket data model + fee constants
β β β βββ BoatOwner.java β Boat owner data model
β β βββ util/
β β βββ Thermalprintermanager.java β Thermal printing utilities
β βββ resources/com/boatticket/
β βββ login.fxml β Login UI layout
β βββ booking.fxml β Booking UI layout
β βββ styles.css β Styling
βββ .idea/runConfigurations/ β Pre-built IntelliJ run com.boatticket.config
BOAT_RIDE_FEE_PER_HOUR = 1500 // per hour
BOAT_RIDE_FEE_2HOURS = 2500 // special rate for 2 hours
LIFE_JACKET_FEE = 10 // per jacket (mandatory)
PARKING_FEE_CAR = 20
PARKING_FEE_BUS = 50
PARKING_FEE_TEMPOTRAVELLER = 40
To change any fee, open src/main/java/com/boatticket/model/Ticket.java and edit the constants at the top.
- Fill in the booking form (login required)
- Select boat/driver, duration, parking if needed
- Click "Generate Ticket"
- The ticket is automatically printed to the default thermal printer
- A preview is also shown in the console
The thermal ticket includes:
- Unique Ticket ID + booking timestamp
- Customer & ride details
- Boat/driver assignment
- Itemised fee breakdown (Boat, Jackets, Parking)
- Driver Amount + Counter Amount
- Total amount
"JavaFX runtime components are missing"
β Make sure you're running via Maven (mvn javafx:run) or add --module-path to VM options.
Dependencies not downloading
β Check internet connection, then: Right-click pom.xml β Maven β Reload Project.
Build fails on module-info.java β Ensure your IntelliJ is set to Java 17: File β Project Structure β SDK = 17.
mvn clean package
java -jar target/BoatTicketSystem-2.0-SNAPSHOT.jarBuild each tenant explicitly. The packaged configuration, boat list, branding, local data directory, and update feed are selected by its Maven profile.
mvn clean package -Phonnavar
mvn clean package -PkasarkodTo build both artifacts in one command on Windows:
.\scripts\build-tenants.ps1This creates either HonnavarBoatTicketSystem-<version>.jar or
KasarkodBoatTicketSystem-<version>.jar. The release workflow creates the corresponding
self-contained Windows MSI installer.
- Fat JAR (created with Maven Shade) - Contains all dependencies (~25-35MB)
- Windows executable (
.exe) launcher created with Launch4j - Batch file launcher (
.bat) as alternative - README and documentation
- Extract the
BoatTicketSystem-2.0-SNAPSHOT-distribution.zipfile - Double-click
BoatTicketSystem.exeor runBoatTicketSystem.bat - The application will start (requires Java 17+ on target machine)
- Windows 7 SP1 or later (64-bit recommended)
- Java 17+ must be installed on the target machine
- ~30-40MB free disk space for the extracted distribution
- Maven Shade Plugin creates a fat JAR containing all dependencies
- Launch4j wraps the JAR into a Windows executable with proper JRE detection
- Maven Assembly packages everything into a distributable zip file
The release workflow produces an MSI with a built-in Java runtime. The installer prompts
for the installation directory and whether to create a desktop shortcut, and it also adds a Start
Menu shortcut. Its icon is derived from src/main/resources/icons8-boat-48.png and stored as
src/main/resources/BoatBookingSystem.ico for Windows packaging.
Unsigned MSI files may show an Unknown Publisher or Microsoft Defender SmartScreen warning. This cannot be suppressed safely by the build workflow; it requires a trusted code-signing certificate and publisher reputation.
mvn clean package -DskipTestsmvn launch4j:launch4jmvn assembly:singlemvn javafx:run