Skip to content

User Manual

Brage Sebastian Sandli-Løvgren edited this page Apr 24, 2026 · 7 revisions

Prerequisites

  • Java 21
  • Maven 3.9+

Running the Application

If you're testing or developing and want to skip the login screen, set TEST_AUTO_LOGIN_ENABLED to true in Main.java:

private static final boolean TEST_AUTO_LOGIN_ENABLED = true;

Application start

Open terminal in the file structure where the pom.xml file is visible and run:

mvn clean javafx:run

This will clean and start the application

Running Tests

Run All Tests

mvn test

Run Specific Test Class

mvn -Dtest=UserDatabaseTest test
mvn -Dtest=DonationDatabaseTest test
mvn -Dtest=LandingPageFiltersTest test
mvn -Dtest=DashboardPageViewMetricsTest test
mvn -Dtest=OrganizationRegisterTest test
mvn -Dtest=MainTest test

Run Specific Test Method

mvn -Dtest=UserDatabaseTest#initializeSeedsUsersWithHashedPasswords test
mvn -Dtest=LandingPageFiltersTest#parseTags_splitsByCommonSeparators test

Run Multiple Test Classes

mvn -Dtest=UserDatabaseTest,DonationDatabaseTest test

Building

Build JAR Only

mvn clean package

Output: target/helpmehelp-1.0-SNAPSHOT.jar

Build Without Tests

mvn package -DskipTests

Data Files

The application uses SQLite databases stored in the data/ directory:

  • users.db — User profiles and authentication
  • donations.db — Donation records

These are created automatically on first run.

Command-Line Arguments

The application accepts optional arguments:

java -jar target/helpmehelp-1.0-SNAPSHOT.jar [username]

Without arguments, uses default user johndoe123.

Troubleshooting

"JavaFX runtime missing"

Ensure JavaFX SDK is available or use Maven wrapper:

./mvnw javafx:run

Database locked error

Close the application and try again. Only one instance should access the database at a time.

Tests fail with "toolkit already started"

This is normal for JavaFX tests. The @BeforeAll handles this:

@BeforeAll
static void startToolkit() {
    try {
        Platform.startup(() -> {});
    } catch (IllegalStateException ignored) {}
}

Common Maven Commands

Command Description
mvn compile Compile source only
mvn test-compile Compile source and tests
mvn clean Clean build directory
mvn clean package Full build
mvn dependency:tree Show dependency tree
mvn help:effective-pom Show resolved POM

IDE Integration

IntelliJ IDEA

  1. Import as Maven project
  2. Add SDK: File → Project Structure → SDKs → Add JDK 21
  3. Run: Right-click Main.java → Run

VS Code

  1. Install Java Extension Pack
  2. Run: mvn javafx:run via terminal

Quick Reference

# Run app
mvn javafx:run

# Run tests
mvn test

# Build
mvn clean package
Clone this wiki locally