将scala功能添加到现有的EJB eclipse项目中 [英] Add scala capabilities into an existing EJB eclipse project
问题描述
但是,我仍然遇到Java编译器尝试编译.scala类的问题,导致错误,最终无法构建项目。
有没有人遇到类似的情况或有任何解决方法?
提前感谢。
您应该能够右键单击项目,转到Scala,然后单击添加scala性质。那么 .scala
文件应该被识别。您可能还需要将Scala库添加到依赖关系中。根据这是否是一个简单的Eclipse项目,或者您使用的是Maven,可能还需要其他步骤。
I have an existing EJB project set up in Eclipse Helios, and would like to slowly introduce Scala into the project. The Scala IDE has been installed successfully, and I'm able to create standalone scala project. The issue however comes when trying to use my existing project with scala additions. I've went as far as manually editing the .project, .classpath, and related files under .settings of the project's home directory for eclipse.
However I still have the issue where the Java compiler tries to compiles .scala classes, which results in errors and ultimately not being able to build the project.
Has anyone faced a similar scenario or are there any workarounds?
Thanks in advance.
You should be able to right-click the project, go to "Scala" and click on "add scala nature". Then .scala
files should be recognized as such. You might also have to add the scala library to your dependencies. Depending on whether this is a "simple" Eclipse project or you're using Maven there might be other steps required.
这篇关于将scala功能添加到现有的EJB eclipse项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!