While running the command scala -version
, it results in the error message
Error: Java executable not found ()
Already installed jdk-23
java -version java version
"23.0.2" 2025-01-21 Java(TM) SE Runtime Environment (build 23.0.2+7-58) Java HotSpot(TM) 64-Bit Server VM (build 23.0.2+7-58, mixed mode, sharing)
Tried the Scala installer for windows on / (Probably didn't work)
Then tried installing Scala through chocolatey
choco install scala --version=3.6.3
(worked)
Then run Scala -v and received the error.
I'm running win64 bit architecture.
While running the command scala -version
, it results in the error message
Error: Java executable not found ()
Already installed jdk-23
java -version java version
"23.0.2" 2025-01-21 Java(TM) SE Runtime Environment (build 23.0.2+7-58) Java HotSpot(TM) 64-Bit Server VM (build 23.0.2+7-58, mixed mode, sharing)
Tried the Scala installer for windows on https://www.scala-lang./download/ (Probably didn't work)
Then tried installing Scala through chocolatey
choco install scala --version=3.6.3
(worked)
Then run Scala -v and received the error.
I'm running win64 bit architecture.
Share Improve this question asked Feb 2 at 7:11 Ravi MishraRavi Mishra 311 silver badge2 bronze badges 3- Some folks at the Discord server are usually able to help troubleshoot Windows installations. - Another note, have you considered using WSL instead? – Luis Miguel Mejía Suárez Commented Feb 2 at 15:21
- What Java distribution do you use (Oracle, Eclipse Adoptium, Corretto,...)? – Robert Commented Feb 2 at 17:56
- I used oracle. Downloaded jdk23 for windows from here oracle/java/technologies/downloads/?er=221886 – Ravi Mishra Commented Feb 4 at 9:55
1 Answer
Reset to default 1I got the same error, but when I set my %JAVA_HOME%
environment variable to C:\Program Files\Java\jdk-23
, this fixed the problem (after restarting my command line).