How to mix/match scala and java in IJ12 (including annotation processing)

Scala /java interdepencies seem to be quite complicated /difficult in IJ12.   I do have scala depending on java and vice versa.  Screenshots show some errors I am getting.

I am using external build as described here

However that does not resolve the IJ/scala interdependencies.

a)  Java classes get code completion in scala classes. But when I go to compile , none of the custom/project java classes are found for the scala compilation unit

b)  Scala classes are not visible at all in Java classes  
c) There is an annotation processor error (see screenshot)

Please provide info (hopefully not too complicated ..) how to get these two to work together.



1 comment
Comment actions Permalink

Update here = My bad!   The Scala class was not placed in the correct directory. That confused both scala and java. After putting in correct directory things are looking great.

See attached screenshot - i am getting code completion of the scala object within the java class by using <MyScalaClass>$.MODULE$.<methodName>  .  That's perfect!


Please sign in to leave a comment.