简体   繁体   English

如何安装Scala软件

[英]How to install Scala software

I want to use a tool written by Scala but I have no experience with Scala. 我想使用Scala编写的工具,但是我没有使用Scala的经验。

The tool I want to use is from https://github.com/allenai/pdffigures2 . 我要使用的工具来自https://github.com/allenai/pdffigures2 It told me how to install the tool in the readme but I can not understand. 它告诉我如何在自述文件中安装该工具,但我听不懂。

It said I need 说我需要

     resolvers += Resolver.bintrayRepo("allenai", "maven")

And then include 然后包括

      libraryDependencies += "org.allenai" %% "pdffigures2" % "0.0.11"

what does that mean, where should I add them? 这是什么意思,我应该在哪里添加它们? I am on Ubuntu. 我在Ubuntu上。 It would be kind if someone can tell me how to install this tool step by step, currently, there is not Scala in my computer. 如果有人可以告诉我如何逐步安装此工具,这是一种好办法,目前,我的计算机中没有Scala。

Install sbt (Scala build tool) from here: http://www.scala-sbt.org/ 从此处安装sbt(Scala构建工具): http : //www.scala-sbt.org/

Create a new Project with 使用创建一个新项目

sbt new scala/scala-seed.g8
cd <project_name>
vi build.sbt

Add your lines to this build.sbt. 将行添加到此build.sbt。 After that you can use the commands given in the section "Command Line Tools" of pdffigures2 之后,您可以使用pdffigures2的“命令行工具”部分中给出的命令

Edit: Just saw that the library is only available for Scala 2.11. 编辑:刚刚看到该库仅适用于Scala 2.11。 Could you change the scala version in build.sbt as follows: 您可以按以下方式在build.sbt中更改scala版本:

scalaVersion := "2.11.11",

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM