FlexDoc/XML - DiagramKit - FAQ
How To Run DiagramKit
Since DiagramKit is a part of FlexDoc/XML software, it will be pre-installed together with FlexDoc/XML.Error occurred during initialization of boot layer
java.lang.module.FindException: Module javafx.base not found, required by flexdoc.xml.diagramkit
Where to get JavaFX?
In order to run DiagramKit, all JavaFX dependencies must be resolved. That can be achieved either:- By installing some JRE (i.e. Java Runtime Environment) that already includes all necessary JavaFX modules by default
- By installing JavaFX separately and specifying the path to its modules in the script/build files running FlexDoc/XML+DiagramKit
But since Java 11, Oracle has moved JavaFX into a separate project found on openjfx.io. Now, those who need JavaFX should download JavaFX SDK separately from there, install it and specify all JavaFX dependencies in their Java application according to that installation. That, of course, is too complicated for many ordinary users, and breaks down the whole idea of using some generic JRE pre-installed on user's computer (independently on FlexDoc/XML).
However, as a compensation for all that perturbation (and actually as its goal), since Java 11, anyone could build their own custom JRE (called «runtime image») that would include in itself any 3rd party modules necessary to run a given application on a particular computer platform.
Now, we took that new opportunity and prepared our own FlexDoc JRE (OpenJDK+JavaFX images) to run FlexDoc/XML+DiagramKit on Windows, Linux and macOS immediately. Just download this Java from our website and don't bother with anything else!
Both possibilities are described below:
Using FlexDoc JRE
We offer a custom JRE (called «FlexDoc JRE»), which is a set of {OpenJDK+JavaFX} images prepared to run FlexDoc/XML+DiagramKit immediately. Here is the step-by-step instruction according to your OS:Using FlexDoc JRE on Windows
-
Go to the downloads page once again and download from there:
“FlexDoc JRE (OpenJDK+JavaFX) to run FlexDoc/XML+DiagramKit | Windows/x64 (zip)”
flexdoc-jre-24_windows.zip
-
Unpack it into
{flexdoc-xml}
. You will have a folder:{flexdoc-xml}\jre_windows
-
Then, go correspondingly to either:
{flexdoc-xml}\XSDDoc\run_with_DiagramKit\windows
{flexdoc-xml}\WSDLDoc\run_with_DiagramKit\windows
generator.bat
anddesigner.bat
found there to run Template Processor / Template Designer with DiagramKit activated as the diagramming engine.
Using FlexDoc JRE on Linux
-
Go to the downloads page once again and download from there:
“FlexDoc JRE (OpenJDK+JavaFX) to run FlexDoc/XML+DiagramKit | Linux/64 (tar.gz)”
flexdoc-jre-24_linux.tar.gz
-
Unpack it into
{flexdoc-xml}
. You will have a folder:{flexdoc-xml}/jre_linux
-
Then, go correspondingly to either:
{flexdoc-xml}/XSDDoc/run_with_DiagramKit/linux
{flexdoc-xml}/WSDLDoc/run_with_DiagramKit/linux
generator.sh
anddesigner.sh
prepared to run respectively Template Processor / Template Designer with DiagramKit activated as the diagramming engine. -
Set a permission to allow executing
generator.sh
/designer.sh
as a program. -
Now, everything must be ready to run
generator.sh
/designer.sh
!
Using FlexDoc JRE on macOS
However, we take advantage of that Apple still allows the macOS users to install and run on their computer the executables built by those users themselves. So, instead of preparing a ready to install & run FlexDoc JRE, we offer you an easy way to build it by yourself (which differs from the former mostly by the size of the downloaded archive file).
-
Go to the downloads page once again and download from there:
“FlexDoc JRE (OpenJDK+JavaFX) to run FlexDoc/XML+DiagramKit | macOS/64 (zip)”
flexdoc-jre-24_macOS.zip
-
Unpack it into
{flexdoc-xml}
. You will have a folder:{flexdoc-xml}/build_jre
openjdk-24_macos-x64_bin.tar.gz
– from https://jdk.java.net/java-se-ri/23openjfx-24_osx-x64_bin-jmods.zip
– from https://gluonhq.com/products/javafx/
-
Now, in order to build the real JRE, you only need to execute the following script found in the same folder:
{flexdoc-xml}/build_jre/build_jre.command
Although, macOS won't allow you to run'build_jre.command'
straight, that is easy to overcome:-
First, open
'build_jre.command'
with TextEdit (confirm in the warning box that it is OK to open it). Then, simply resave that file via File | Save menu. With that procedure, you will sign'build_jre.command'
as its owner/creator, which is a precondition to be able running it. -
On top of that, you will need also to assign
'build_jre.command'
with the executable privilege. Run the Terminal and type in it'chmod u+x'
followed by a space and the full pathname of the script file (instead of typing it, just drag'build_jre.command'
from the Finder into the Terminal window). Then, press Enter.
'build_jre.command'
from the Finder just by clicking twice on it. -
First, open
-
After executing
'build_jre.command'
, a new directory will be created:{flexdoc-xml}/jre_macos
'build_jre'
folder can be deleted then.) -
Then, go correspondingly to either:
{flexdoc-xml}/XSDDoc/run_with_DiagramKit/macOS
{flexdoc-xml}/WSDLDoc/run_with_DiagramKit/macOS
generator.command
anddesigner.command
prepared to run respectively Template Processor / Template Designer with DiagramKit activated as the diagramming engine.But again, to be able to run any of those script files, first you need to- Resave the script file using TextEdit.
-
Assign it with the executable privilege (by running the Terminal, typing in it
'chmod u+x'
followed by a space, draggingscript.command
into the Terminal window and pressing Enter).
Using standard Java + JavaFX SDK
If for some reasons you cannot use our FlexDoc JRE (for instance, in case of Maven), you may use any other (standard) Java installed on your system.Then, you will need:
- To specify the location of your Java in the script files running FlexDoc/XML+DiagramKit.
-
To download JavaFX SDK from openjfx.io,
install it on your system and specify the path to its modules in the script/build files running FlexDoc/XML+DiagramKit.
Concerning the compatibility of different versions of Java (JDK) and JavaFX. As of Apr 2025, all currently released JavaFX versions 11-24 will work with JDK 11 or later.
Using standard Java + JavaFX SDK on Windows
-
Go to openjfx.io (or directly to https://gluonhq.com/products/javafx/)
and download “JavaFX Windows SDK”, e.g.:
openjfx-24_windows-x64_bin-sdk.zip
Do not download “JavaFX Windows jmods” archive also available there! That is not a proper JavaFX SDK. Although, JMOD files contain some compiled images of Java modules, they can be processed only by jlink command, used to build a custom JRE.
Unpack the downloaded archive somewhere. You will get a folder like this:C:\javafx-sdk-24
-
Then, go correspondingly to either:
{flexdoc-xml}\XSDDoc\run_with_DiagramKit\windows
{flexdoc-xml}\WSDLDoc\run_with_DiagramKit\windows
generator.bat
/designer.bat
found in that directory, in these lines:::----------------------------------------------------------------------
:: Specify the location of Java 11 (or later) here. The default setting:
::
:: set JAVA_HOME=%FDH%\jre
::
:: assumes the installation of FlexDoc JRE (OpenJDK+JavaFX),
:: which you can download from http://www.flexdoc.xyz/downloads/
::----------------------------------------------------------------------
set JAVA_HOME=C:\Program Files\Java\jdk-24
::----------------------------------------------------------------------
:: Specify the location of JavaFX SDK 'lib' directory, e.g.:
:: C:\javafx-sdk-24\lib
::
:: Note: When you use FlexDoc JRE, leave this setting empty
::----------------------------------------------------------------------
set PATH_TO_FX=C:\javafx-sdk-24\lib -
Now, you can start
generator.bat
/designer.bat
to run Template Processor / Template Designer with DiagramKit activated as the diagramming engine.
Using standard Java + JavaFX SDK on Linux
-
Go to openjfx.io (or directly to https://gluonhq.com/products/javafx/)
and download “JavaFX Linux SDK” archive, e.g.:
openjfx-24_linux-x64_bin-sdk.zip
Do not download “JavaFX Linux jmods” archive also available there! That is not a proper JavaFX SDK. Although, JMOD files contain some compiled images of Java modules, they can be processed only by jlink command, used to build a custom JRE.
Unpack the downloaded archive somewhere. You will get a folder like this:/home/user/javafx-sdk-24
-
Then, go correspondingly to either:
{flexdoc-xml}/XSDDoc/run_with_DiagramKit/linux
{flexdoc-xml}/WSDLDoc/run_with_DiagramKit/linux
generator.sh
anddesigner.sh
prepared to run respectively Template Processor / Template Designer with DiagramKit activated as the diagramming engine.Edit
generator.sh
/designer.sh
in these lines:#----------------------------------------------------------------------
# Specify the location of Java 11 (or later) here. The default setting:
#
# JAVA_HOME="$FDH/jre"
#
# assumes the installation of FlexDoc JRE (OpenJDK+JavaFX),
# which you can download from http://www.flexdoc.xyz/downloads/
#----------------------------------------------------------------------
JAVA_HOME="/home/user/jdk-24"
#----------------------------------------------------------------------
# Specify the location of JavaFX SDK 'lib' directory, e.g.:
# /home/user/javafx-sdk-24/lib
#
# Note: When you use FlexDoc JRE, leave this setting empty
#----------------------------------------------------------------------
PATH_TO_FX="/home/user/javafx-sdk-24/lib" -
Set a permission to allow executing
generator.sh
/designer.sh
as a program. -
Now, everything must be ready to run
generator.sh
/designer.sh
.
Using standard Java + JavaFX SDK on macOS
-
Go to openjfx.io (or directly to https://gluonhq.com/products/javafx/)
and download “JavaFX macOS SDK” archive, e.g.:
openjfx-24_osx-x64_bin-sdk.zip
Do not download “JavaFX Mac OS X jmods” archive also available there! That is not a proper JavaFX SDK. Although, JMOD files contain some compiled images of Java modules, they can be processed only by jlink command, used to build a custom JRE.
Unpack the downloaded archive somewhere. You will get a folder like this:/Users/Shared/javafx-sdk-24
-
Then, go correspondingly to either:
{flexdoc-xml}/XSDDoc/run_with_DiagramKit/macOS
{flexdoc-xml}/WSDLDoc/run_with_DiagramKit/macOS
generator.command
anddesigner.command
prepared to run respectively Template Processor / Template Designer with DiagramKit activated as the diagramming engine.Edit
generator.command
/designer.command
in these lines:#----------------------------------------------------------------------
# Specify the command used to invoke JVM (Java 11 or later) here.
# The default setting:
#
# JAVA_COMMAND="$FDH/jre/bin/java"
#
# assumes the installation of FlexDoc JRE (OpenJDK+JavaFX),
# which you can download from http://www.flexdoc.xyz/downloads/
#----------------------------------------------------------------------
JAVA_COMMAND="java"
#----------------------------------------------------------------------
# Specify the location of JavaFX SDK 'lib' directory, e.g.:
# /Users/Shared/javafx-sdk-24/lib
#
# Note: When you use FlexDoc JRE, leave this setting empty
#----------------------------------------------------------------------
PATH_TO_FX="/Users/Shared/javafx-sdk-24/lib" -
To be able to run
generator.command
, first, open it with TextEdit (confirm in the warning box that it is OK to open it). Then, simply resave that file via File | Save menu. By doing that you will signgenerator.command
as its owner/creator, which is a precondition to be able running it.Then, you need to assign
generator.command
with the executable privilege. Run the Terminal and type in it'chmod u+x'
followed by a space and the full pathname of the script file (instead of typing it, just draggenerator.command
from the Finder into the Terminal window). Then, press Enter.Now, you can run
generator.command
from the Finder just by clicking twice on it. -
Equally with
designer.command
.
Integration with Ant/Maven/Docker
A demo about that you can find in your FlexDoc/XML installation:{flexdoc-xml}/XSDDoc/run_with_DiagramKit/ant/
{flexdoc-xml}/XSDDoc/run_with_DiagramKit/maven/
{flexdoc-xml}/XSDDoc/run_with_DiagramKit/docker/
{flexdoc-xml}/WSDLDoc/run_with_DiagramKit/ant/
{flexdoc-xml}/WSDLDoc/run_with_DiagramKit/maven/
{flexdoc-xml}/WSDLDoc/run_with_DiagramKit/docker/
{flexdoc-xml}/plugins/DiagramKit/README.html