Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] PlantUml local rendering on Ubuntu: java.exe not found #10435

Open
Mario-Soller opened this issue Nov 28, 2024 · 4 comments
Open

[Bug] PlantUml local rendering on Ubuntu: java.exe not found #10435

Mario-Soller opened this issue Nov 28, 2024 · 4 comments
Labels
bug A bug to fix

Comments

@Mario-Soller
Copy link

PlantUML local rendering on Ubuntu: java.exe not found
When trying to build PlantUML files locally during a docfx build using the plantuml.jar on a linux machine, an error gets thrown:
Image

It seems to want to access the java.exe to run the jar.
I tried to run the exact same project on a Windows 10 Machine, where it ran as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Install DocFx on an Ubuntu Machine and initialize a project
  2. Add a plantUml Diagram to your docfx project
  3. Install the plantuml.jar and add to project: https://plantuml.com/de/download (I used MIT)
  4. Edit docfx.json:
    Image
  5. Run docfx build

Expected behavior
docfx build should run and build the PlantUML Diagrams using the locally installed plantuml.jar.

Context:

  • OS: Ubuntu 24.04.1 LTS
  • Docfx version: 2.78.2
  • Java version: openjdk 21.0.5 2024-10-15

Additional context
Using the remote server plantuml.com is not possible, due to the machine being offline.

@Mario-Soller Mario-Soller added the bug A bug to fix label Nov 28, 2024
@filzrev
Copy link
Contributor

filzrev commented Nov 28, 2024

It seems to be PlantUml.Net side problem.
PlantUml.Net trying to resolve bin/java.exe from JAVA_HOME environment variable.
https://github.com/KevReed/PlantUml.Net/blob/d49cb4cc95b3ab0539d52d2d89421dd8ba7d476b/src/Java/EnvironmentJavaLocator.cs#L18

What's happens when explicitly specify JavaPath option to /usr/lib/jvm/java-21-openjdk-amd64/bin/java? (without .exe)

@Mario-Soller
Copy link
Author

Running docfx build using the javaPath in the config causes the process to be stuck indefinetly during this stage:
Image

@filzrev
Copy link
Contributor

filzrev commented Nov 30, 2024

Running docfx build using the javaPath in the config causes the process to be stuck indefinetly during this stage:

I'm also confirmed reported issue can be reproduced on Ubuntu OS.
So I've created issue to PlantUml.Net repository. (https://github.com/KevReed/PlantUml.Net/issues/33)

Until problems are fixed by PlantUml.Net side.
There is a workaround by self-hosting plantuml-server on local environment.

@Mario-Soller
Copy link
Author

Thank you!
And yes, I am also running a local server (via docker) to workaround this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug to fix
Projects
None yet
Development

No branches or pull requests

2 participants