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

PlantUML can not find java #112

Closed
MaSven opened this issue Apr 19, 2018 · 13 comments
Closed

PlantUML can not find java #112

MaSven opened this issue Apr 19, 2018 · 13 comments
Labels

Comments

@MaSven
Copy link

MaSven commented Apr 19, 2018

Plantuml can not find java even though the javahome is set and java bin folder is in the path. Is there a way i can figure out how the extension is looking for the path?

@qjebbs
Copy link
Owner

qjebbs commented Apr 20, 2018

Plug in don't looking for any path. Make java -version works in terminal, then it works with the plugin.

@MaSven
Copy link
Author

MaSven commented Apr 21, 2018

This is the problem java -version works in the terminal. Maybe there is a problem, that my java version is behind a symlink? I use sdkman to switch the java version frequently. So the actual java version is behind a symlink.

@qjebbs
Copy link
Owner

qjebbs commented Apr 22, 2018

Maybe it is the problem, that the child_process module behaves different in this case, I guess. Can you try testing with no-symlink-java?

qjebbs added a commit that referenced this issue Apr 22, 2018
@qjebbs
Copy link
Owner

qjebbs commented Apr 22, 2018

If you still cannot locate the problem, try to configure java path with latest release.

@MaSven
Copy link
Author

MaSven commented Apr 22, 2018

With the newest version it works after declaring the path to the java executable in the new setting. It also follows the symlink. Thank you for the fast fix.

@MaSven MaSven closed this as completed Apr 22, 2018
@huangshuai-IOT
Copy link

huangshuai-IOT commented May 30, 2019

你好,我使用 PlantUML Visual Code Extension Version 2.11.0,报错" Cannot find java!
If you've installed java, please add java bin path to PATH environment variable.
Or, configure java executable path with "plantuml.java"."

我将java bin path添加到PATH 环境变量,在终端中可以使用 java -version,还是同样的错误。

然后修改了settings中的Java executable location 为 C:\Program Files\Java\jdk-12.0.1\bin\

还是报错,请问怎么处理? @qjebbs

@qjebbs
Copy link
Owner

qjebbs commented Jun 1, 2019

@huangshuai-IOT plantuml.java should be like c:/path/to/your/java.exe, yours, is just a folder.

@huangshuai-IOT
Copy link

@qjebbs 你好,我分别尝试设置 plantuml.javaC:/Program Files/Java/jdk-12.0.1/bin/java.exeC:\Program Files\Java\jdk-12.0.1\bin\java.exe , 但还是同样的错误 Cannot find java! If you've installed java, please add java bin path to PATH environment variable. Or, configure java executable path with "plantuml.java". 我是Windows10。

@juergs
Copy link

juergs commented Nov 26, 2019

This works for me:
Enter only java.exe as "java executable location" without any path => works !
(Not having to add any java-bin-path to path etc....)
;-)

@mewhuan
Copy link

mewhuan commented Jan 7, 2020

Add the extension globally works for me.
Tried to install plantuml in the first window of vscode, instead of in my sub window solve the problem.

@coutamg
Copy link

coutamg commented Mar 18, 2020

Fill in Java.exe in java executable location, then it work!@huangshuai-IOT

@mjjackey
Copy link

@qjebbs 你好,我分别尝试设置 plantuml.javaC:/Program Files/Java/jdk-12.0.1/bin/java.exeC:\Program Files\Java\jdk-12.0.1\bin\java.exe , 但还是同样的错误 Cannot find java! If you've installed java, please add java bin path to PATH environment variable. Or, configure java executable path with "plantuml.java". 我是Windows10。

your path configuration is incorrect, you should configure the jre path in the system environment as follows sequentially:

  1. JAVA_HOME
  2. CLASSPATH
  3. Path
    Then in plantuml.java fill 'java'.

@wYaobiz
Copy link

wYaobiz commented Aug 4, 2022

Great! Solved this issue!

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

No branches or pull requests

8 participants