Unable to import a Scala object into the Java project
<p>I created a Scala <code>object</code>:</p>

<pre><code>package myapp.data

import java.io.File
import myapp.models.NodeViewModel
import com.thoughtworks.xstream.XStream
import com.thoughtworks.xstream.io.xml.DomDriver

object ForumSerializer {
    def openFile(file : File) : NodeViewModel = {
        // doing something
    }

    def saveToFile(model : NodeViewModel) : Unit = {
        // doing something
    }
}
</code></pre>

<p>Then I tried to import it in another Java file</p>

<pre><code>import myapp.ForumSerializer;
</code></pre>

<p>The error I get is:</p>

<pre><code>Import myapp.ForumSerializer cannot be resolved.
</code></pre>

<p>What am I doing wrong?</p>