Question

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?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top