Closed athas closed 1 year ago
Ah. Do you remember the error message? I am not so familiar with this part of the code.
Did it crash or did it print something like Flix requires Java 11 or later.
?
Or did it maybe dump something from the shell, like java: command not found
?
Here's what I see (on Windows 10) if java
is not on PATH
(with version 0.74.0 of vscode-flix
):
Yes, that looks like what I saw as well.
@magnus-madsen After installing flix vscode extension, the similar error message also occured for me.
$ java -version
java version "17.0.5" 2022-10-18 LTS
Java(TM) SE Runtime Environment (build 17.0.5+9-LTS-191)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.5+9-LTS-191, mixed mode, sharing)
Interesting. Thanks! We are looking into it.
Let me know if you find a solution.
Let me know if you find a solution.
pretty weird! The flix vscode extension worked today.
@mR4smussen I think here we should just change the message to say: "Unable to find java
on PATH. Please check that Java is correctly installed and on your PATH".
I think this issue is a lot like the one with the JAVA_HOME and I'm again not sure about getting this variable in a general way for all operating systems without actually using java. What do you think about us simply sending a general message for both variables if we are not able to use java to find the java version here @magnus-madsen ?
("Unable to access Java. Please check that Java is correctly installed and on your PATH and set as JAVA_HOME")
I think the current solution is fine, just a question of updating the error message.
Fixed in master.
I was told that the language extension could not determine the version (which I guess is technically true), but the real issue is that there was no
java
executable on the path. Telling the user explicitly to install it might be a better error message.