-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Flutter doctor uses wrong path to determine the Java version: Cannot execute /wrong/path/to/java to determine the version. #108618
Comments
Hi @jfsanchez91
Looks like you installed this version before and it's still linked. Could you try removing this directory |
@huycozy that folder does not exist. |
@jfsanchez91 Could you try creating a symbolic link from |
@huycozy I already did that as a workaround, but I would really like to get rid of it. Why is flutter looking for that path? |
@jfsanchez91 It looks like a Flutter tool's issue. Keeping this open for further investigation from the team. |
I happened to be looking at this code just now, so I tried to work out how these reported symptoms could happen. As far as I can tell, the answer will have to involve either the JAVA_HOME environment variable, or the PATH environment variable, pointing to that Java installation. The code that drives that "Java binary at:" message in the That leaves the mystery of why the I don't have an answer for that mystery. But, knowing nothing about how snaps work, my wild guess is that it's something to do with the snap. Perhaps @jfsanchez91 If you can still reproduce this issue, and you're interested in debugging it, my suggestion would be to use
That'll dump a few hundred lines to the
and to see if the value of PATH ever changes:
|
I installed flutter using snap
$ sudo snap install flutter --classic
Here is my environment:
Here is the
flutter doctor -v
report:How can I solve the java verion error "
Cannot execute /home/USER/.sdkman/candidates/java/8.0.222-amzn/bin/java to determine the version
" reported?I don't even have that java version (8.0.222-amzn) installed in my system
Thx in advance
The text was updated successfully, but these errors were encountered: