How do I run the example in the playframework samples folder?
Today I installed Play Framework 2.0 (Windows 7 Professional and JDK 1.7.0)
I am having problems compiling and running the "zentasks" sample application.
Here are my steps:
-
Create a new app named zentasks
-
Eclipsify new application for IDE
-
Import source for eclipse
-
All code examples are overwriting my new application.
-
Run and compile the application using the "play run" command
The error encountered:
not enough arguments for method apply: (projects: java.util.List[models.Project], user: models.User)(body: play.api.templates.Html)play.api.templates.Html in object main. Unspecified value parameter user.
In D:\play20\zentasks\app\views\index.scala.html at line 3.
1 @(message: String)
2
3 @main("Welcome to Play 2.0") {
4
5 @play20.welcome(message, style = "Java")
6
7 }
What happened?
Any other configurations or dependencies needed?
Thank!
+3
source to share
2 answers
If you want the code to be available in Eclipse, for example for debugging purposes, you can follow these steps:
- At the command line, change to the directory
C:/Play-2.0/samples/java/zentasks
- Executing a command
play
starts the playback console. - In the Play Console run the command
eclipsify
- Eclipse config files are generated - Import project into Eclipse with
File/Import/General/Existing project...
- you now have project codes in Eclipse - Execute commands
play run
orplay debug run
from the command line (in the project directory) as usual - To debug, run a remote debugger on port 9999 from Eclipse after the command
play debug run
.
+2
source to share