문제

I created a Java / Maven project in Eclipse, and added the Scala nature. Eclipse can compile my Scala classes (when they are correct), but if I create a Scala interpreter in the project, I cannot import my classes in it. It says my root package does not exist. What am I doing wrong?

도움이 되었습니까?

해결책

This seems to work correctly in the latest version of Scala Eclipse Plugin (2.0.0.beta09). Do you still have the problem?

다른 팁

OK. Just for the records. I'm not sure why it didn't work when I first posted this. But I know why it doesn't work now.

If I have any error at all in my Scala code, in any source file, the compiler doesn't produce any compiled class at all! This is totally different from Java. I am programming Java at work, and I'm often running apps in workspaces where a dozen of irrelevant files don't compile without problems.

I find this a very strange behavior. I can't imagine any of our developer PCs being powerful enough to compile 1.6M lines of (Java) code in memory before writing the class files to disk.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top