My folder structures:
- root
- .idea folder
- Other Unrelated projects
- myplayapp
- src (the Actual Play! folder)
- myplayapp.iml
- app
- conf
- logs
- public
- …
I’m trying to run/debug my first unit test from within IntelliJ, and getting an error “Cannot read application.conf“. When I debug into Play.readConfiguration(), I see that Play.init() is passed a file pointing at the root folder (it’s “.”, but its absolute path points to root).
I’ve tried passing the argument -Dapplication.path=myplayapp\src, but I don’t think it’s even processed before the error is thrown.
Is there something I can do here? In the meantime, I’ll try creating an IntelliJ project within the myplayapp folder, but that’s a workaround, not a real solution.
What you should do is:
That should work, barring any other unrelated issues.