#!/bin/bash

# the local JavaFX SDK path relative to this project
JAVAFX_LIB_PATH="javafx-sdk-24.0.1/lib"

# Build the project and copy dependencies
mvn clean package dependency:copy-dependencies

# Run the JavaFX application
java --module-path "$JAVAFX_LIB_PATH" \
     --add-modules javafx.controls,javafx.base,javafx.graphics \
     -cp "target/classes:$(echo target/dependency/*.jar | tr ' ' ':')" \
     com.javalens.JavaLensApp
