Closed
Description
Compiler version
Scala compiler version 3.1.3 -- Copyright 2002-2022, LAMP/EPFL
How to reproduce
- Install Scala somewhere with spaces, like
C:\Program Files\Scala\scala3
- Notice that WSL automagically adds Scala to the path because Windows has it in its path
- Try to run Scala.. see error
Output
# uname -a
Linux SURFACE 4.4.0-22000-Microsoft #832-Microsoft Fri Jul 15 14:40:00 PST 2022 aarch64 GNU/Linux
# which scala
/mnt/c/Program Files/Scala/scala3/bin/scala
# scala -version
Error: Could not find or load main class Files.Scala.scala3
Caused by: java.lang.ClassNotFoundException: Files.Scala.scala3
Expectation
Scala's shell scripts should (like its batch counterparts, and like other Java-based utilities, like ant, maven, gradle, groovy) handle paths with spaces. This is especially noticable by people who use Scala on windows in combination with WSL.