문제

I have the following line in my build.sbt:

libraryDependencies += "org.bouncycastle" % "bcprov-jdk16" % "1.46"

When I go to REPL and launch my project there, the following works:

scala> import org.bouncycastle.jce.provider.BouncyCastleProvider
import org.bouncycastle.jce.provider.BouncyCastleProvider

scala> val a = new BouncyCastleProvider
a: org.bouncycastle.jce.provider.BouncyCastleProvider = BC version 1.46

But when I try to import the same package in Eclipse I get an error:

import org.bouncycastle.jce.provider.BouncyCastleProvider
// object bouncycastle is not a member of package org

Why is this happening?

도움이 되었습니까?

해결책

Have you tried running sbt eclipse? That should create Eclipse project files, .classpath among them as well, which contains paths to dependencies.

Unless you use a version of Eclipse with support for dependencies under sbt, you'll have to execute sbt eclipse every time you've changed them.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top