# Value of mainClassName, 'application' plugin already applied

**URL:** <https://discuss.gradle.org/t/value-of-mainclassname-application-plugin-already-applied/10719>\
**Category:** Help/Discuss\
**Created:** [July 21, 2015, 8:11pm UTC](https://discuss.gradle.org/t/value-of-mainclassname-application-plugin-already-applied/10719 "2015-07-21T20:11:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjendoplasm](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jjendoplasm](https://discuss.gradle.org/u/jjendoplasm)\
**Post date:** [July 21, 2015, 8:11pm UTC](https://discuss.gradle.org/t/value-of-mainclassname-application-plugin-already-applied/10719/1 "2015-07-21T20:11:52Z")

</div>

Basically, there are 28 sub projects and one mega-build.gradle file on the project path, and I have included application plug-in everywhere to ensure that mainClassName property was set. However, in installApp step, I still run into this error. I am not sure what’s the way to go about this.

12:59:02.844 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.  
12:59:02.844 [ERROR] [org.gradle.BuildExceptionReporter]  
12:59:02.844 [ERROR] [org.gradle.BuildExceptionReporter] \* What went wrong:  
12:59:02.844 [ERROR] [org.gradle.BuildExceptionReporter] A problem was found with the configuration of task ‘:startScripts’.  
12:59:02.844 [ERROR] [org.gradle.BuildExceptionReporter] \> No value has been specified for property ‘mainClassName’.  
12:59:02.845 [ERROR] [org.gradle.BuildExceptionReporter]  
12:59:02.845 [ERROR] [org.gradle.BuildExceptionReporter] \* Try:  
12:59:02.845 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.  
12:59:02.845 [LIFECYCLE] [org.gradle.BuildResultLogger]  
12:59:02.846 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED

---

<div class="post-metadata">

**Author:** ![Francois\_Guillot](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/francois_guillot/32/8566_2.png) [@Francois\_Guillot](https://discuss.gradle.org/u/Francois_Guillot)\
**Post date:** [July 21, 2015, 8:19pm UTC](https://discuss.gradle.org/t/value-of-mainclassname-application-plugin-already-applied/10719/2 "2015-07-21T20:19:53Z")

</div>

You have to specify the value of this property to the full name of your main class  
e.g. mainClassName=‘org.package.MyMainClass’

---

<div class="post-metadata">

**Author:** ![jjendoplasm](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jjendoplasm](https://discuss.gradle.org/u/jjendoplasm)\
**Post date:** [July 21, 2015, 8:48pm UTC](https://discuss.gradle.org/t/value-of-mainclassname-application-plugin-already-applied/10719/3 "2015-07-21T20:48:37Z")

</div>

Thank you very much Francois, your answers helped me a lot in resolving my issues.  
For future inquirers, key was to specify mainClassName in a project build.gradle itself as well.
