java.net.URISyntaxException. sbt - space in path

Viewed 421

I have tried this behavior on sbt 0.13.16 and 1.0.1. Not just for sbtVersion but with even the other sbt commands. I believe the problem is because of the empty space in the path (/C:/Users/Jatin Puri/.sbt/preloaded/)

D:\spark-stemming>sbt sbtVersion
"C:\Users\Jatin Puri\.sbt\preloaded\org.scala-sbt\sbt\"1.0.1"\jars\sbt.jar"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
java.net.URISyntaxException: Illegal character in path at index 21: file:/C:/Users/Jatin Puri/.sbt/preloaded/
    at java.net.URI$Parser.fail(Unknown Source)
    at java.net.URI$Parser.checkChars(Unknown Source)
    at java.net.URI$Parser.parseHierarchical(Unknown Source)
    at java.net.URI$Parser.parse(Unknown Source)
    at java.net.URI.<init>(Unknown Source)
    at java.net.URL.toURI(Unknown Source)
    at sbt.Resolver$url$.apply(Resolver.scala:269)
    at sbt.Classpaths$.sbt$Classpaths$$bootRepository(Defaults.scala:1658)
    at sbt.Classpaths$$anonfun$appRepositories$1.apply(Defaults.scala:1634)
    at sbt.Classpaths$$anonfun$appRepositories$1.apply(Defaults.scala:1634)

What can be a fix for it? (I can't of-course change the user name). Is this an sbt bug? (I can't believe if it is so, because it is so normal and probable).

Could a fix be to change the default path away from ~/.sbt? But I have not been able to do that. How do we change this default path.

1 Answers

This problem has been reported on the sbt issue tracker: sbt/sbt#1412 and sbt/sbt#3253. You can help debugging it by writing there and providing more information about your project setting and sbt installation.

Related