最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

"Error: Java executable not found ()" while trying to install scala on windows - Stack Overflow

programmeradmin0浏览0评论

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
Add a comment  | 

1 Answer 1

Reset to default 1

I 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).

发布评论

评论列表(0)

  1. 暂无评论