"No main class detected" when running Play 2 App (Play 2.3) from IntelliJ IDEA 13

1,442 views
Skip to first unread message

Andrew Easter

unread,
Jun 14, 2014, 3:18:23 AM6/14/14
to play-fr...@googlegroups.com
Hi,

I saw something on Stackoverflow about this particular problem, but the solution didn't work for me. Was wondering if anyone else has run into it. I've imported a Play 2.3 project fresh into IntelliJ from the build.sbt file. When trying to "Run Play 2 App", the console exits with the error "No main class detected".

Was wondering what the problem is here. Does anyone else have problems running Play 2.3 apps in IntelliJ 13?

Thanks,

Andrew

Donovan Muller

unread,
Jun 16, 2014, 7:53:54 AM6/16/14
to play-fr...@googlegroups.com
Hi Andrew,

I don't have time to verify now but I'm guessing it's because 2.3 moved to Activator (see here for context: https://groups.google.com/d/msg/play-framework/-Wuopt6NAxg/aeo5setBEHgJ).
The IntelliJ plugin is probably trying to invoke 'play' and not 'activator'.

Assuming Unix like environment, can you try creating a symlink for 'activator' to 'play' and then trying again?

Ming Fang

unread,
Jun 16, 2014, 8:23:08 AM6/16/14
to play-fr...@googlegroups.com
This has been a problem before 2.3. 
The workaround is to add -Duser.dir=<app root dir> to the run settings. 

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeff May

unread,
May 19, 2015, 3:41:13 PM5/19/15
to play-fr...@googlegroups.com, ming...@gmail.com
Unfortunately, this only works if you have a build.sbt in the subproject. If you have a single build.sbt at the root of the subproject and us a build.scala for your common settings.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages