Skip to content

Instantly share code, notes, and snippets.

@mszczepanczyk
Last active April 30, 2021 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mszczepanczyk/1aa4c2f672ccfc3afe8d3c196e5f3de3 to your computer and use it in GitHub Desktop.
Save mszczepanczyk/1aa4c2f672ccfc3afe8d3c196e5f3de3 to your computer and use it in GitHub Desktop.
Run FileBot with JavaFX on macOS
#!/bin/bash
# fixes "Failed to initialize JavaFX. Please install JavaFX."
# $ ls -1
# FileBot.jar
# filebot.sh
# javafx-sdk-11.0.2
set -e
# https://stackoverflow.com/questions/59895/get-the-source-directory-of-a-bash-script-from-within-the-script-itself
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
java -p "$DIR/javafx-sdk-11.0.2/lib" --add-modules javafx.swing --add-modules javafx.fxml --add-modules javafx.controls -jar FileBot.jar "$@"
@mfoti
Copy link

mfoti commented Apr 30, 2021

it works ty :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment