Package contains object and package with same name
问题 I am having problems compiling some Scala with Maven or Eclipse where I try to import a class from a Java jar which contains both a namespace and class of the same name. I can compile with scalac , however. E.g. the Java project (jar) contains: src/foo/bar.java src/foo/bar/some_resource.txt -> foobar.jar Scala project references foobar.jar Foobartest.scala: import foo.bar class foobartest { } The compiler complains with: package foo contains object and package with same name: bar one of them