score:9
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"?>
<projectDescription>
<name>xxxxxxxxxxxxx</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.scala-ide.sdt.core.scalabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.scala-ide.sdt.core.scalanature</nature>
</natures>
</projectDescription>
and
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<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"/>
</classpath>
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*
score:8
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
Source: stackoverflow.com
Related Query
- Mixing Scala and Java files in an Eclipse project
- Maven: mixing Java and Scala in one project
- Mixing AspectJ and Scala in an Eclipse Project
- Building a project with mixed Scala and Java source files using Ant - illegal cyclic reference error
- Is anyone having success mixing scala and java files in IntelliJ
- Mixing java and scala in a single project - tests in scala, core in java
- Include Scala and Java Nature in Play2 Eclipse Project with javaCore
- How do you include files from a scala project in eclipse in a java project in netbeans
- How to initialize a new Scala project in sbt, Eclipse and github
- Simultaneous Java and Scala development within the same project
- Scala and Java in same project
- Setting different spaces for tab for Java and Scala in Eclipse
- Can I compile a Scala project with mixed java and scala code with dependencies both ways in Maven?
- Mixing scala, maven and java within Eclipse - unit testing
- Play Framework: Mixing Java and Scala controller/views
- Environment for java + scala + lift project in eclipse without maven
- Mixing scala and java in Play Framework
- Is it recommended to separate Scala and Java source files for a Maven project?
- Working with java and scala in eclipse
- maven project which has both java and scala
- value foo in class MyJavaClass of type java.lang.String has incompatible type mixing in Java class and Scala trait
- Unable to compile spring boot project with java and scala using maven
- Scala project as "sub-project" of Java project in eclipse
- Mixing Scala and Java on Wicket
- Eclipse Oxygen and Scala IDE 4.7 crashes with play framework 2.6.6 project in workspace
- Mix Lombok, Java and Scala in a maven project
- Eclipse Project with Scala Plugin, Maven and Spark
- Mixing java, scala and xtend files in one project?
- Integrating both Java and Scala into one project
- Custom Accumulator Spark error using Java class type in mix Scala and Java Spark project
More Query from same tag
- Add custom method to JsonFormat
- SBT creates two target folders. Is this normal?
- How I can list all sbt dependencies?
- json to avro conversion for name fiield with special characters
- self reference value
- Slick: Read nullable values as option when left join
- Permutations with predicate Scala
- How to fix "static methods in interface require -target:jvm-1.8" in Scala application?
- Subclassing classes that have type parameters
- Using extractors to parse text files
- Implicits and type definitions
- How to copy a single value in a dataframe to another dataframe in spark scala
- What is best practice to represent data by Scala case classes
- Specifying a frame icon on Scala’s Swing Frame
- Converting literal to RDD for subsequent Cartesian Product
- Array of case class as parameter T
- Match list with two values in Scala
- How do I inherit shared code in a Scala unapply function?
- Slick producing bad SQL for MySQL (MyISAM)
- What's the equivalent of `scala.tools.nsc.MainGenericRunner` in Scala 3?
- What are all the uses of an underscore in Scala?
- Why Scala on Mac fails when run in unicode directory
- How to ask Scala if evidence exists for all instantiations of type parameter?
- How to create a Row from a List or Array in Spark using Scala
- How to get the final element of a hierarchical array in scala and apply aggregate functions on it?
- How to pass an object to a method in Scala
- When are Scala macro annotations executed? (macro paradise)
- Creating a single column table with Slick
- Correctly specify path dependent type annotation
- Composition with the same trait, but different type parameters