Closed linuswagner closed 9 months ago
Hmm that is strange. It should find the jdk 11 and run with that, or else show a warning message.
Could you provide a bit of context? Which OS? What is JAVA_HOME
?
Also, please share the specific javac -version
output, maybe the regex is firing on something in there that it shouldn't.
Sadly, I do not have the student with me anymore.
But the OS was Ubuntu 22 and the output of java -version
is
openjdk version "1.8.0_342"
OpenJDK Runtime Environment (build 1.8.0_342-8u342-b07-1-b07)
OpenJDK 64-Bit Server VM (build 25.342-b07, mixed mode)
javac -version
then gives javac 1.8.0_342
.
I don't know what JAVA_HOME pointed to
Strange, that should not have been allowed, as the regex detects that javac 1.8.0_342
as jdk8.
I just tested it out on a fresh install of windows, installed java 8, and on first start of a REPL (or any other rascal action), I get this popup:
after that, it installs the local version of java and it works. maybe it's different on ubuntu?
Thanks for the effort! I'll set up an Ubuntu VM next week and try my best to reproduce the issue for you.
I checked it again:
sudo update-java-alternatives --set /path/to/java/version
I set Java 8 to the defaultTherefore, bug not confirmed. However, I found that VS Code does not prompt during a single session again if you click the message away. Only, if you close and re-open VS Code, the popup comes again. Maybe, we ran into this (even though, we did several restarts)
Thanks @linuswagner for reporting and the thoughtful analysis. Cheers!
However, I found that VS Code does not prompt during a single session again if you click the message away. Only, if you close and re-open VS Code, the popup comes again.
this is by design, to not bother the user too much. but then again, stuff isn't working as they would expect (as in there is no rascal). So maybe we should reconsider this.
But like Jurgen said, thanks for verifying.
We were on a system running OpenJDK 8 and 11. OpenJDK 8 was set as the default.
When you install the VS Code extension in this context, it does not prompt you with the dialog if you want to install a JDK.
However, the REPL fails to load, because it tries the default version of the JDK (here: 8) and his is below the supported version of Rascal.
Either, the plugin should notify the user of this problem and help to change the default or Rascal itself should not go for the system default, but for the JDK that it supports.