idea配置scala开发环境

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=512m

-XX:ReservedCodeCacheSize=128m

# Set the extra SBT options

-Dsbt.log.format=true
-Dsbt.boot.directory=F:/sbt-1.1.6/data/.sbt/boot
-Dsbt.global.base=F:/sbt-1.1.6/data/.sbt
-Dsbt.ivy.home=F:/sbt-1.1.6/data/.ivy2
-Dsbt.repository.config=F:/sbt-1.1.6/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路径。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值