开发者

SBT doesn't see Java classes

This is how my directories tree looks like:

src/main/ --- java (some .java files)
          |
          |- scala (subdirectories with .scala files)
          |
          |- resources (some images)

I try to import a package which is written in Java into my Scala project.

[error] /home/ciembor/test/src/main/scala/TestView.sca开发者_如何学Gola:9: not found: object waveform
[error] import waveform._
[error]        ^

I think sbt doesn't browse through files from src/main/java. How may I force it?


Are your java files in the proper directories, e.g., src/main/java/waveform/...?

Unlike scala, java file hierarchies are supposed to match their packaging. Scala/sbt will make this happen for scala files but not for java files.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜