Add scala capabilities into an existing EJB eclipse project

你。 提交于 2019-12-07 19:29:36

问题


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.


回答1:


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.




回答2:


Right click on project, and choose Configure/Add Scala Nature.



来源:https://stackoverflow.com/questions/7402269/add-scala-capabilities-into-an-existing-ejb-eclipse-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!