Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play! framework - views aren't compiled?

I created a new project and working with eclipse (used eclipsify command).
basically, I moved the app directory from an old project to the new one I created.

the problem is that eclipse doesn't recognize the views. I get errors like:

views.html.viewTopic cannot be resolved to a type

I tried to play compile but it didn't help.
so I got 40 errors. all of them connected to the fact that the views aren't compiled and therefore, the eclipse doesn't recognize them (my guess of course).

what can I do?
by the way, the old project compiled and ran without a problem (I used intellij)

like image 819
socksocket Avatar asked Sep 21 '12 11:09

socksocket


2 Answers

For Java Play Framework v2.4.6 (activator v1.3.7) with Eclipse Mars:

So that you will not have a "can not resolve error" with your viewTopic.render(), you can add this <classpathentry kind="lib" path="target/scala-2.11/classes"/> to your .classpath or right-click on your project -> Build Path -> Configure Build Path -> Add Class Folder and make it point to target/scala-2.11/classes.

like image 60
jpllosa Avatar answered Sep 19 '22 16:09

jpllosa


  • Run 'play eclipse' on the command line
  • In Eclipse, refresh your Project via hitting F5
like image 38
nemoo Avatar answered Sep 22 '22 16:09

nemoo