简体   繁体   中英

Eclipse run configuration for Play Framework

I am currently trying to run a test application based on the Play framework. The project was created using the command line tool for play and then converted into an eclipse project by using

play eclipse

The documentation says that this step also created a run configuration to run the code from eclipse. But there is no configuration created.

After pressing run, eclipse is looking for a main method that is not existing.

I also tried to launch the project from the command line using play ~run . But I have included and imported a class from another project and the compiler always ends with an error saying the imported package could not be found.

Thanks for your help.

play eclipse (or play eclipsify for previous versions) is only so that you can import your project in Eclipse and use the debugger, get auto-complete, etc. You're still meant to run the application from the console though.

As to the second part of your question you'd need to provide more details. What exactly do you mean by, "I have included and imported a class from another project" ?

The solution for the problem was, that external libraries have to be included in the /lib folder of the project as .jar-Archive. The folder was not auto-created. All libraries in this folder will be added to the build-path of play automatically.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM