1、建立scala項目,報錯。
搜尋:sbt設定MaxPermSize
原因:
(1)https://www.douban.com/group/topic/45016729/
(2)https://www.douban.com/note/311383726/
參考解決方法:
https://www.cnblogs.com/30go/p/7909630.html
https://www.cnblogs.com/zeling/p/8494828.html
解決步驟:
(1)下載下傳sbt1.1.6
(2)進入conf檔案夾,修改sbtconfig.txt(注意配置的路徑關聯):
# Set the java args to high
-Xmx1024M
-XX:MaxPermSize=m
-XX:ReservedCodeCacheSize=m
# Set the extra SBT options
-Dsbt.log.format=true
-Dsbt.boot.directory=F:/sbt-./data/.sbt/boot
-Dsbt.global.base=F:/sbt-./data/.sbt
-Dsbt.ivy.home=F:/sbt-./data/.ivy2
-Dsbt.repository.config=F:/sbt-./conf/repo.properties
(3)在conf中建立repo.properties:
[repositories]
local
aliyun: http://maven.aliyun.com/nexus/content/groups/public/
typesafe: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sonatype-oss-releases
maven-central
sonatype-oss-snapshots
(4)打開cmd,輸入sbt,如果出現類似下面的結果則表明安裝成功:
C:\Users\PetterChen>sbt
“C:\Users\PetterChen.sbt\preloaded\org.scala-sbt\sbt\”1.0.3”\jars\sbt.jar”
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Loading project definition from C:\Users\PetterChen\project
[info] Set current project to petterchen (in build file:/C:/Users/PetterChen/)
[info] sbt server started at 127.0.0.1:4729
sbt:petterchen>
(5)最後在idea配置sbt的sbt-launch.jar路徑。