# Suggestion: IntelliJ Kotlin plugin's configuration: "Main class" -\> "Main package"

**URL:** <https://discuss.kotlinlang.org/t/suggestion-intellij-kotlin-plugins-configuration-main-class-main-package/234>\
**Category:** Uncategorized\
**Created:** [June 18, 2015, 11:35pm UTC](https://discuss.kotlinlang.org/t/suggestion-intellij-kotlin-plugins-configuration-main-class-main-package/234 "2015-06-18T23:35:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknownjoe796](https://avatars.discourse-cdn.com/v4/letter/u/58956e/32.png) [@unknownjoe796](https://discuss.kotlinlang.org/u/unknownjoe796)\
**Post date:** [June 18, 2015, 11:35pm UTC](https://discuss.kotlinlang.org/t/suggestion-intellij-kotlin-plugins-configuration-main-class-main-package/234/1 "2015-06-18T23:35:32Z")

</div>

I suggest that the Kotlin plugin for IntelliJ have the field "Main class" be renamed to something like "Main package".

Why: I spend hours going in circles because I couldn’t figure out how to set up a Kotlin configuration in Intellij.&nbsp;&nbsp;I couldn’t figure out what I was supposed to put for the “Main class:” in my run configuration.&nbsp;&nbsp;It’s a misnomer because it misdirects people to thinking that they need to create a new class with a main function in it, when what they need to do is put in the name of the package that contains their main function.

It could also help if the wizard for creating a Kotlin project provided you with a small main file with a “hello world” and configuration already set up.

For reference: I know about the right click menu NOW, but for whatever reason it wasn’t showing up when I was first trying to figure things out.

---

<div class="post-metadata">

**Author:** ![guildenstern70](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/guildenstern70/32/1503_2.png) [@guildenstern70](https://discuss.kotlinlang.org/u/guildenstern70)\
**Post date:** [June 19, 2015, 12:57pm UTC](https://discuss.kotlinlang.org/t/suggestion-intellij-kotlin-plugins-configuration-main-class-main-package/234/2 "2015-06-19T12:57:31Z")

</div>

Good point! The same applies for me.

---

<div class="post-metadata">

**Author:** ![yole](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/yole/32/1425_2.png) [@yole](https://discuss.kotlinlang.org/u/yole)\
**Post date:** [June 20, 2015, 8:21am UTC](https://discuss.kotlinlang.org/t/suggestion-intellij-kotlin-plugins-configuration-main-class-main-package/234/3 "2015-06-20T08:21:13Z")

</div>

You can in fact have 'main' in a class:

class MyMain {  
&nbsp;&nbsp;companion object {  
&nbsp;&nbsp;platformStatic fun main(args: Array\<String\>) { … }  
&nbsp;&nbsp;}  
}

Or in a top-level object:

object MyMainObj {  
&nbsp;&nbsp;platformStatic fun main(args: Array\<String\>) { … }  
}

Because of that, simply renaming “class” to “package” is not a correct thing to do.

On the other hand, IntelliJ IDEA 15 will show the “run” icons for runnable methods in the editor gutter, which will make automatic run configuration setup even more visible, even if you don’t discover the right-click menu action to run a function.
