Accepted answer

I'm also using Helios (because I've gone 64-bit) and found the plugin behaving a bit odd at times (though to be honest not much differently than in Galileo). When mixing Java and Scala, as you found, it would look like there's no problem, but there would be no compiled code. Or worse a Java class dependent on a Scala class wouldn't compile because the Scala class wasn't compiled -- but it wouldn't compile until all the errors were gone from the project, which of course wouldn't happen until it compiles... ug.

I began tinkering with the classpath and project files, and eventually got it to work, though I can't really say why. I swear I changed a file, then changed it back, and then it worked??

Anyway, here are my files:

<?xml version="1.0" encoding="UTF-8"?>


<?xml version="1.0" encoding="UTF-8"?>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="bin"/>

The critical thing seems to be that SCALA_CONTAINER come before JRE_CONTAINER, but... I wouldn't bet on it either. The order of the "natures" may be important, too.

It's been working for me now for a week or two, with daily updates, so... *fingers-crossed*


I've noticed that Eclipse-IDE sometimes doesn't compile my Scala files when I create a new file. I have to select the project in Package Explorer and refresh it (F5). Also, you can change the compilation order (Java first vs. Scala first) in Eclipse by going to:

Window->Preferences->Scala->Compiler->Build Manager->compileorder

Related Query

More Query from same tag