• Windows下sbt安装配置


    1.下载sbt

    2.配置环境

    #SBT_HOME设置为sbt解压目录,例如:

    SBT_HOME=C:Programssbt;

    #在path中添加:

    Path=%SBT_HOME%bin;

    3.sbt配置

    在sbtconfsbtconfig.txt中末尾添加

    -Dsbt.boot.directory=C:/Programs/sbt/data/.sbt/boot
    -Dsbt.global.base=C:/Programs/sbt/data/.sbt
    -Dsbt.ivy.home=C:/Programs/sbt/data/.ivy2
    -Dsbt.repository.config=C:/Programs/sbt/conf/repo.properties
    -Dsbt.repository.secure=false
    
    # 设置代理
    # -Dhttp.proxyHost=10.18.11.11
    # -Dhttp.proxyPort=8080
    # -Dhttp.proxyUser=xx
    # -Dhttp.proxyPassword=xx
    
    # -Dhttps.proxyHost=10.18.1111
    # -Dhttps.proxyPort=8080
    # -Dhttps.proxyUser=xx
    # -Dhttps.proxyPassword=xx

    如果有需要设置代理的话,将“#设置代理”下面的#号去掉,并添加相应的代理设置,#是注释。

    4.设置阿里云镜像

    国内的网络环境复杂,阿里云还挺好用的,在sbtconf下新建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

    5.验证

    打开cmd,输入sbt,如果出现类似下面的结果则表明安装成功:

    C:UsersPetterChen>sbt
    "C:UsersPetterChen.sbtpreloadedorg.scala-sbtsbt"1.0.3"jarssbt.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:UsersPetterChenproject
    [info] Set current project to petterchen (in build file:/C:/Users/PetterChen/)
    [info] sbt server started at 127.0.0.1:4729
    sbt:petterchen>

    注意,第一次运行的时候,sbt需要下载一些东西,下载消耗时间看网络情况状态。sbt版本不同的话,最后的结果也可能不一样,但是只要配置和网络正常,最后都会进入sbt的控制台。

  • 相关阅读:
    在Python下调用Labview
    CVX: Matlab Software for Disciplined Convex Programming
    ANSYS Electronics Desktop 调出HFSS模块
    在python下打开cmd,并调用其他py文件
    CVXOPT的安装
    分享小记:指数族分布
    应用运筹学基础:线性规划 (4)
    应用运筹学基础:线性规划 (3)
    应用运筹学基础:线性规划 (2)
    白话论文:A Tutorial on Principal Component Analysis
  • 原文地址:https://www.cnblogs.com/zeling/p/8494828.html
Copyright © 2020-2023  润新知