Java 在eclipse for Play框架中设置sbteclipse

Java 在eclipse for Play框架中设置sbteclipse,java,eclipse,playframework,eclipse-plugin,sbteclipse,Java,Eclipse,Playframework,Eclipse Plugin,Sbteclipse,我是一个新手。我随后成功地安装了它,但现在我想在eclipse上集成这个项目。我从游戏中观看,但我不知道该写在哪里 addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0") 以及其他步骤 我正在使用Mac Os X和Eclipse Luna。您需要将其写入“project\plugins.sbt”文件: 顺便说一句,如果您计划只使用java(正如我从标签中看到的),那么您也可以将以下几行添加到“build.

我是一个新手。我随后成功地安装了它,但现在我想在eclipse上集成这个项目。我从游戏中观看,但我不知道该写在哪里

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
以及其他步骤


我正在使用Mac Os X和Eclipse Luna。

您需要将其写入“project\plugins.sbt”文件:

顺便说一句,如果您计划只使用java(正如我从标签中看到的),那么您也可以将以下几行添加到“build.sbt”文件中:

// Compile the project before generating Eclipse files,
// so that generated .scala or .class files for views and routes are present
EclipseKeys.preTasks := Seq(compile in Compile)

// Java project. Don't expect Scala IDE
EclipseKeys.projectFlavor := EclipseProjectFlavor.Java

// Use .class files instead of generated .scala files for views and routes
EclipseKeys.createSrc := EclipseCreateSrc.ValueSet(EclipseCreateSrc.ManagedClasses, EclipseCreateSrc.ManagedResources)
更新

也给出了很好的建议:

// Compile the project before generating Eclipse files,
// so that generated .scala or .class files for views and routes are present
EclipseKeys.preTasks := Seq(compile in Compile)

// Java project. Don't expect Scala IDE
EclipseKeys.projectFlavor := EclipseProjectFlavor.Java

// Use .class files instead of generated .scala files for views and routes
EclipseKeys.createSrc := EclipseCreateSrc.ValueSet(EclipseCreateSrc.ManagedClasses, EclipseCreateSrc.ManagedResources)

使用文本编辑器修改
project/plugins.sbt
build.sbt
如上文所述,然后运行
ActivatorEclipse
sbt eclipse
。 然后,您应该能够通过导入Eclipse中的项目
文件->导入->现有项目到工作区


但是如何在eclipse中导入play项目呢?使用文本编辑器,修改
project/plugins.sbt
build.sbt
如上所述,然后运行
activator eclipse
sbt eclipse
。然后您应该能够通过
文件导入Eclipse中的项目
->
导入
->
现有项目到工作区
。谢谢您,播放文档在这一点上有点模糊,但这让我开始了!@Randall Harleigh向下滚动到最后,我建议IntelliJ IDE使用大字体突出显示。你应该更经常地查看play doc。在那里你可以找到更简单的解决方案(将链接滚动到末尾以查看答案)。thanx回答了你的问题,但问题太晚了,我搬了Spring Boot,很高兴使用Spring Boot哦~没有意识到,但是现在没有多少人使用play,社区并不是很活跃