Using plantuml.jar with JavaFX

0 votes
asked Apr 9, 2021 in To be sorted by anonymous
How do I use plantuml.jar instructions in Java? I searched a lot but I didn't get what I wanted. I need to link this tool with JavaFX.

2 Answers

0 votes
answered Apr 9, 2021 by The-Lu (65,440 points)

Hello A.,

For starting, you can read:

If that can help,
Regards,
Th.

0 votes
answered Jun 4, 2023 by tcab (200 points)
edited Jun 7, 2023 by tcab
A modern version of a Javafx project (e.g. that created by vscode java plugin) is modular, and the plantuml jar is not modular - but can still be used if you add it to the --module-path.

You also have to edit the javafx project's src/main/java/module-info.java to contain

module com.example {
    requires javafx.controls;
    requires javafx.fxml;
    requires javafx.web;
    requires net.sourceforge.plantuml;   <---
...
}

Unfortunately deploying a Javafx app that uses plantuml is trickier, as using jlink to create a custom jre for your javafx app will now fail, because it can't handle non modular jars. Unless the plantuml developers on day offer a modular jar, I'm not sure what the solution to this is.

I've raised an issue for this: https://github.com/plantuml/plantuml/issues/1446
...