I am trying to run an application using Play Framework 2.4 with JDK8 on Mac when I load the database using. / activator new Project play-java, the template code contains the following:
Project / application / controlles / Application.java
package controllers; import play.*; import play.mvc.*; import views.html.*; public class Application extends Controller { public Result index() { return ok(index.render("Your new application is ready.")); } }
But when I replace this part:
public static Result index() {...
adding "static" to index ()
I get this error
Compilation error value index is not a member of controllers.Application .../conf/routes:6 4 # ~~~~ 5 # Home page 6 GET / controllers.Application.index()
I donβt know why, because all examples use static for Result
source share