How to run a Play project in Eclipse

2019-06-18 16:40发布

hello I've been trying to find how to run a Java Play project in eclipse but I can't find an easy way. Here is what I've done

Create a project

play new testApp

Go to the folder

cd testApp

Eclipsify the project

play eclipsify

Open eclipse and import as an existing project, but then I don't know how to run the server from eclipse

NOTE: I know that I can run it in the console also. The problem is that I've added an Eclispe project to the buildpath using Eclipse so If I run it in the console I think it will not work, or am I wrong?

4条回答
老娘就宠你
2楼-- · 2019-06-18 16:51

For Play 2.x.y, Activator is tool of choice

activator eclipse

or

./activator eclipse

to use project local activator copy (if exists)

查看更多
淡お忘
3楼-- · 2019-06-18 16:55

Play eclipsify creates a run configuration for you.

Run --> Run Configurations --> Java Applications --> testApp

If you need to debug first run the application as indicated then

Run --> Debug Configurations --> Remote Java Applications --> Connect JPDA to testApp

查看更多
地球回转人心会变
4楼-- · 2019-06-18 17:03

I was trying "play eclipsify" but that wasn't working since it had changed to "play eclipse" and it works fine.

查看更多
贼婆χ
5楼-- · 2019-06-18 17:09

In newer versions of play, the command has changed to

play eclipse
查看更多
登录 后发表回答