Unable to execute SBT from windows CMD prompt



Hello - I have installed sbt-1.1.1 from https://www.scala-sbt.org/download.html

When i execute SBT on windows command prompt, i get the below.
C:\Program Files (x86)\sbt\bin>SBT
Java HotSpot™ 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[warn] No sbt.version set in project/build.properties, base directory: C:\Program Files (x86)\sbt\bin
[info] Set current project to bin (in build file:/C:/Program%20Files%20(x86)/sbt/bin/)
[info] sbt server started at local:sbt-server-46f81a95e7c028c5229f
Exception in thread “sbt-socket-server” java.lang.RuntimeException: Could not create directory C:\Program Files (x86)\sbt\bin\project\target
at scala.sys.package$.error(package.scala:27)
at sbt.io.IO$.createDirectory(IO.scala:227)
at sbt.io.OpenFile.open(Using.scala:42)
at sbt.io.OpenFile.open$(Using.scala:39)
at sbt.io.Using$$anon$2.open(Using.scala:75)
at sbt.io.Using$$anon$2.open(Using.scala:75)
at sbt.io.Using.apply(Using.scala:21)
at sbt.io.IO$.writer(IO.scala:767)
at sbt.io.IO$.write(IO.scala:761)
at sbt.internal.server.Server$$anon$2.sbt$internal$server$Server$$anon$$writePortfile(Server.scala:183)
at sbt.internal.server.Server$$anon$2$$anon$1.run(Server.scala:76)
[warn] sbt server could not start in 10s

Note Bane : i have added the bin directory to the environment variables (PATH)


I had the same issue. Right click on the command prompt and open the command prompt as administrator and execute SBT command. It should work good.