what is linux sbt

青灯夜游
Release: 2023-03-15 11:55:40
Original
1534 people have browsed it

In Linux, the full name of sbt is "Simple Build Tool", which is similar to maven and is a powerful project management and dependency management tool. sbt natively supports compiling Scala code and interacting with many Scala test frameworks. It uses Ivy as a library management tool, integrates the scala interpreter for rapid iteration and debugging, and supports mixed Java and Scala projects.

what is linux sbt

The operating environment of this tutorial: linux7.3 system, sbt 1.1.4, Dell G3 computer.

What is sbt

Sbt is similar to maven and is a powerful project management and dependency management tool.

sbt (Simple Build Tool, simple build tool), compiles Scala or Java language, similar to Maven or Ant, it requires jdk1.6 or higher version support. sbt can be installed and used in Windows or Linux environments.

Main features:

  • Native support for compiling Scala code and interacting with many Scala test frameworks;

  • Written in Scala DSL (Domain Specific Language) build description

  • Using Ivy as library management tool

  • Continuous compilation, testing and deployment

  • Integrate the scala interpreter for fast iteration and debugging

  • Support mixed Java and Scala projects

Linux installation sbt

1. Download the sbt installation package

Download address from the sbt official website: https://www.scala-sbt .org/download.html

2. Unzip and install

tar -zxvf sbt-1.1.4.tgz # 解压
cd /usr/software/sbt/ # 进入解压目录
vim sbt # 新建一个名字为sbt的文本,并在在文本中加入以下内容
#!/bin/bash
SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M"
java $SBT_OPTS -jar /usr/software/sbt/bin/sbt-launch.jar "$@"  # 注意对应路径
# wq保存退出
chmod u+x ./sbt # 修改sbt脚本文件权限
sudo vim /etc/profile # 配置PATH环境变量
# 在文件最后添加:
export PATH=/usr/software/sbt/:$PATH
# wq保存退出
source /etc/profile # 使配置文件立刻生效
Copy after login

3. Test

sbt sbtVersion
Copy after login

when executed for the first time , some file packages will be downloaded before it can be used normally. You need to ensure that it is connected to the Internet.

what is linux sbt

Actual effect:

what is linux sbt

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of what is linux sbt. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template