How do I add JavaFX to my system?

Yellowfin FAQ shared this question 3 years ago
Answered

I'm using Yellowfin 9.3 and want to export my Dashboard to PDF. Though I don't have the option as I don't have JavaFX. How can I actually add it?

Best Answer
photo

Adding the JavaFX library is easy, however your method heavily depends on your OS/Java environment. Generally speaking, this task should be handled by the IT Server Admin, however we’ve created this article to provide some guidance.

Here are a few known working combinations of Java and JavaFX:

  • JDK 11 and JavaFX 15
  • Amazon Coretto JDK 11 and JavaFX 16


Before moving forward with this guide please ensure that;

  • You are using Yellowfin 9.3
  • You have confirmed it's currently missing from your Java distribution.
    See the following article to check if you already have it.


Now time to get it all installed, via 2 options;

  • Add to your existing Java distribution
  • Install a new Java package that includes JavaFX

Adding it to your existing Java distribution

  1. Stop Yellowfin
  2. Download the relevant JavaFX SDK for your system from Gluon, or a package downloader (eg, https://gluonhq.com/products/javafx/ or if you’re using Linux, you could use apt-get install openjfx).
  3. Unzip the downloaded file into a folder somewhere on your system for safe keeping.
    Windows users: You may face some security issues if placing under c:\program files, so choose an alternative location.
    Linux users, your JavaFX files should be in /usr/share/java).
  4. Add the following lines to your catalina file located under (yellowfin\appserer\bin) , or Windows Service.
    You will need to add the lines immediately after the first set JAVA_OPTS= statement
    Windows users using a Windows Service:
    a) Open a command prompt as administrator and navigate to your Yellowfin\appserver\bin folder
    b) Run the following Command
    tomcatXw.exe //ES//Yellowfin
    Note: Where X is the version of Tomcat. ie. Tomcat9w.exe, Tomcat8w.exe, and Yellowfin is the name of your Windows Service
    c) Navigate to the Java tab and add the following commands in the Java Options window (each on on a new line):
    --module-path=C:\temp\javafx-sdk-15\lib
    --add-modules=javafx.web
    -Djbd.jfxPath=C:\temp\javafx-sdk-15\lib
    See an example below:
    93782be9b94aadc58f115dd60b007815
    Windows users: Modify catalina.bat
    set JFX_PATH=C:\temp\javafx-sdk-15\lib
    set JAVA_OPTS=%JAVA_OPTS% --module-path=%JFX_PATH% --add-modules=javafx.web -Djbd.jfxPath=%JFX_PATH%
    Linux users: Modify catalina.sh
    JFX_PATH=/usr/java/javafx-sdk-11.0.2/lib
    JAVA_OPTS="$JAVA_OPTS --module-path=$JFX_PATH --add-modules=javafx.web -Djbd.jfxPath=$JFX_PATH"
    MacOS users: Modify the catalina.sh
    JFX_PATH=/Applications/javafx-sdk-11.0.2/lib
    JAVA_OPTS="$JAVA_OPTS --module-path=$JFX_PATH --add-modules=javafx.web -Djbd.jfxPath=$JFX_PATH"
  5. Start Yellowfin.


Install a new Java package that includes JavaFX

  1. Stop Yellowfin.
  2. Find a JVM that comes with JavaFx embedded into it. Zulu FX (as opposed to standard Zulu) and Bellsoft both create JVMs that can be used out of the box which contain JavaFX.
  3. Please note, you will need to ensure your Yellowfin installation points to the new Java distributions.
    To do this just modify the relevant file and update the Java home variables.
    Windows users: For the Windows Service, see the following on how modify. Otherwise modify catalina.bat
    Linux users: Modify catalina.sh
    MacOS users: Modify the catalina.sh
  4. Restart Yellowfin.

If you’re stuck and need some extra guidance, please reach out to our Support Team via our community, we will be more than happy to help.


Regards,David

Replies (2)

photo
1

Adding the JavaFX library is easy, however your method heavily depends on your OS/Java environment. Generally speaking, this task should be handled by the IT Server Admin, however we’ve created this article to provide some guidance.

Here are a few known working combinations of Java and JavaFX:

  • JDK 11 and JavaFX 15
  • Amazon Coretto JDK 11 and JavaFX 16


Before moving forward with this guide please ensure that;

  • You are using Yellowfin 9.3
  • You have confirmed it's currently missing from your Java distribution.
    See the following article to check if you already have it.


Now time to get it all installed, via 2 options;

  • Add to your existing Java distribution
  • Install a new Java package that includes JavaFX

Adding it to your existing Java distribution

  1. Stop Yellowfin
  2. Download the relevant JavaFX SDK for your system from Gluon, or a package downloader (eg, https://gluonhq.com/products/javafx/ or if you’re using Linux, you could use apt-get install openjfx).
  3. Unzip the downloaded file into a folder somewhere on your system for safe keeping.
    Windows users: You may face some security issues if placing under c:\program files, so choose an alternative location.
    Linux users, your JavaFX files should be in /usr/share/java).
  4. Add the following lines to your catalina file located under (yellowfin\appserer\bin) , or Windows Service.
    You will need to add the lines immediately after the first set JAVA_OPTS= statement
    Windows users using a Windows Service:
    a) Open a command prompt as administrator and navigate to your Yellowfin\appserver\bin folder
    b) Run the following Command
    tomcatXw.exe //ES//Yellowfin
    Note: Where X is the version of Tomcat. ie. Tomcat9w.exe, Tomcat8w.exe, and Yellowfin is the name of your Windows Service
    c) Navigate to the Java tab and add the following commands in the Java Options window (each on on a new line):
    --module-path=C:\temp\javafx-sdk-15\lib
    --add-modules=javafx.web
    -Djbd.jfxPath=C:\temp\javafx-sdk-15\lib
    See an example below:
    93782be9b94aadc58f115dd60b007815
    Windows users: Modify catalina.bat
    set JFX_PATH=C:\temp\javafx-sdk-15\lib
    set JAVA_OPTS=%JAVA_OPTS% --module-path=%JFX_PATH% --add-modules=javafx.web -Djbd.jfxPath=%JFX_PATH%
    Linux users: Modify catalina.sh
    JFX_PATH=/usr/java/javafx-sdk-11.0.2/lib
    JAVA_OPTS="$JAVA_OPTS --module-path=$JFX_PATH --add-modules=javafx.web -Djbd.jfxPath=$JFX_PATH"
    MacOS users: Modify the catalina.sh
    JFX_PATH=/Applications/javafx-sdk-11.0.2/lib
    JAVA_OPTS="$JAVA_OPTS --module-path=$JFX_PATH --add-modules=javafx.web -Djbd.jfxPath=$JFX_PATH"
  5. Start Yellowfin.


Install a new Java package that includes JavaFX

  1. Stop Yellowfin.
  2. Find a JVM that comes with JavaFx embedded into it. Zulu FX (as opposed to standard Zulu) and Bellsoft both create JVMs that can be used out of the box which contain JavaFX.
  3. Please note, you will need to ensure your Yellowfin installation points to the new Java distributions.
    To do this just modify the relevant file and update the Java home variables.
    Windows users: For the Windows Service, see the following on how modify. Otherwise modify catalina.bat
    Linux users: Modify catalina.sh
    MacOS users: Modify the catalina.sh
  4. Restart Yellowfin.

If you’re stuck and need some extra guidance, please reach out to our Support Team via our community, we will be more than happy to help.


Regards,David

photo
1

Hi David,


When you get a chance, could this please be added to the section on broadcasting dashboards on the Yellowfin wiki?


https://wiki.yellowfinbi.com/display/yfcurrent/Broadcast#Broadcast-BroadcastaDashboard


Thanks,

Simon

photo
1

Fair point, will pass it on Simon. Thanks!

Replies have been locked on this page!