[英]Scala Lift - How to use 3rd party JAR files in project
I've done this before but can't seem to remember what folder to create or where to put jar files. 我以前做过这个,但似乎无法记住要创建的文件夹或放置jar文件的位置。
I'm attempting to include an independently developed JAR file into my Lift project, so I can do: 我正在尝试将一个独立开发的JAR文件包含到我的Lift项目中,所以我可以这样做:
import org.imgscalr._
And use it etc. 并使用它等
Any help much appreciated, thanks in advance. 任何帮助非常感谢,提前感谢。
Quick bad way: 快坏方法:
Add the .jar
file to your nameofproject/lib/
folder, it should automatically be added to your classpath. 将
.jar
文件添加到nameofproject/lib/
文件夹中,它应自动添加到您的类路径中。
Proper way: Use SBT 正确的方法:使用SBT
libraryDependencies ++= Seq(
"org.imgscalr" % "imgscalr-lib" % "4.2"
)
This library is published to Maven Central, right HERE . 这个图书馆发布到Maven Central,就在这里 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.