0

scalac D:\temp\main.scala works

scalac "D:\Programming\Java works\my project\main.scala" returns this error:

works\my was unexpected at this time

I think the problem is caused by spaces in path. How can I resolve this problem (I would not remove spaces in path)?

Scala 2.11.6 (last version) on Windows 7 x64

Beryllium
  • 12,808
  • 10
  • 56
  • 86
Alex 75
  • 2,798
  • 1
  • 31
  • 48
  • as quick solution you can use short path, to find out path check http://superuser.com/questions/348079/how-can-i-find-the-short-path-of-a-windows-directory-file – Iłya Bursov Mar 19 '15 at 20:50
  • Personally, I would suggest not using spaces in your directory/file names. That said, it may be something with scala expecting a string that's escaped for a unix-type filesystem. Does adding a backslash in the string before the space help at all? – childofsoong Mar 19 '15 at 21:06
  • A bit more looking around found this: https://stackoverflow.com/questions/6036462/running-java-gives-error-could-not-open-c-program-files-java-jre6-lib-amd64. It may just be an error in the batch file that runs scala in Windows. – childofsoong Mar 19 '15 at 21:09

0 Answers0