-
Notifications
You must be signed in to change notification settings - Fork 204
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
Can't find Java runtime on macOS (when installed using Homebrew) #277
Comments
@tcurdt That's great insight, thank you for your contribution! I don't have a Mac, so I don't think I will be able to fix it myself, but someone from the community might be able to do it. I would start by looking into the Python scripts in the |
True. I would be nice if would the installation automatically. I just looked at the code but this does not really make any sense to me (yet).
On my machine the search expression is This is a version that works for me and seems a little more flexible.
HTH |
Thanks, I'll look into it and try to integrate it into the KiCad plugin script. The script above looks into the temp folder, because when an installed and up-to-date Java installation is not found, the script installs the proper runtime into the temp folder. So when we look for a valid installation we also need to check the temp folder to avoid repeated JDK downloads. Is it always the case that the java executable doesn't included in PATH folders on Mac? (I'm not sure if it's called PATH on Mac.) |
AFAIK an interactive shell process and an application process might not have the same PATH setup. I think applications are really started through launchd and that's why they don't have all the user environment variables inherited. |
Hey there!👋 This issue is stale because it has been inactive for 60 days. If this matter is still relevant, feel free to remove the stale label or add a comment. Otherwise, it will be closed in 7 days. But remember, with thousands of monthly active users, someone might just have the solution you need. This is a community-driven project, and your active participation is crucial. If the issue is critical for your work, consider contributing a fix yourself or hiring someone to help. I'm here to support your efforts and will review and merge pull requests as quickly as I can. Let's collaborate to keep improving our project! 🚀 Your involvement is invaluable, and together, we can ensure the continuous growth and success of our community. Thank you for being an integral part of this journey. Your engagement is what drives our project forward! |
I guess the question is whether this should just be added to the docs or whether this should be fixed in code. |
I started the investigation by chatting with ChatGPT, and I got this:
Does this sound correct? Also, as far as I know, you can install Temurin JRE without Homebrew, and then the java executable will be installed in Could you confirm this? |
Yes, bottom line: there just isn't a fix location. There are a couple of common locations to check. Hence I would suggest to have a couple of locations to search. You could also have a read here which feels a bit outdated though. |
I updated the check_java.py script according to the information I found on the link you sent me. Could you check if that returns a correct Java path and version number for you? |
I didn't have to time to run it yet - but I can tell you already that it ain't working like that:
Please keep in mind this is for an interactive session. |
Alright then, we will look for the In the other script we install the Java JRE on the fly if the above fails or returns a non-sufficient version number. I updated the script again, does it look better? |
While the script looks better - none of that would have helped me and I would have opened the issue anyway.
I fear it's:
I think the important distinction and most likely problem here is that the environment is not that of the user but coming from launchd. |
Alright, I think I see what you mean with the commons paths. They are useful as a fallback if we can't access the I wonder if we can access any arbitrary folder (defined in the It's getting complicated, I have to say :) Anyway, I'll try to incorporate these changes without breaking anything for the other platforms... |
I fear it's the "fun" of cross-platform :) Folder access could be restricted if KiCad runs in a sandboxed environment (which I don't think it is - because then file access would be a much bigger hell). But I think 1.-4. isn't so bad. Especially as (just as me) people can edit the And support for |
I tried to run version 1.9.0 from KiCAD 8 on macOS 14.
It didn't find the installed java runtime.
The easy fix was to go into the
plugin.ini
and change the java path fromjava
to/opt/homebrew/opt/openjdk/bin/java
I am just not sure where contribute a patch to the docs. But maybe people will find it in the issues.
The text was updated successfully, but these errors were encountered: