# Can't start a main class

**URL:** <https://discuss.kotlinlang.org/t/cant-start-a-main-class/1243>\
**Category:** Uncategorized\
**Created:** [March 18, 2012, 2:00am UTC](https://discuss.kotlinlang.org/t/cant-start-a-main-class/1243 "2012-03-18T02:00:28Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![goodwinnk](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/goodwinnk/32/1481_2.png) [@goodwinnk](https://discuss.kotlinlang.org/u/goodwinnk)\
**Post date:** [March 19, 2012, 4:24pm UTC](https://discuss.kotlinlang.org/t/cant-start-a-main-class/1243/21 "2012-03-19T16:24:05Z")

</div>

Glad that it did help! As a result of this topic discussion I've created [KT-1612](http://youtrack.jetbrains.com/issue/KT-1612) to prevent appearing this problem in future.

I expect that your current problem will dissappear after moving kotlin file into src folder (I saw from your last screenshot that Hello.kt is under module folder). I expect that there’s should be some warning about this situation too.

---

<div class="post-metadata">

**Author:** ![cedricbeust](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/cedricbeust/32/1429_2.png) [@cedricbeust](https://discuss.kotlinlang.org/u/cedricbeust)\
**Post date:** [March 19, 2012, 9:29pm UTC](https://discuss.kotlinlang.org/t/cant-start-a-main-class/1243/22 "2012-03-19T21:29:36Z")

</div>

Oops, I didn't notice that my source was not in the src/ directory. Moving it there did fix the problem, thanks!

Feature request: either support source files outside of src/ (“Are you sure you want to put your file there? This is not a source directory.”) or don’t allow stupid users such as myself to create them there 🙂

---

<div class="post-metadata">

**Author:** ![abreslav](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/abreslav/32/8279_2.png) [@abreslav](https://discuss.kotlinlang.org/u/abreslav)\
**Post date:** [March 20, 2012, 10:57am UTC](https://discuss.kotlinlang.org/t/cant-start-a-main-class/1243/23 "2012-03-20T10:57:03Z")

</div>

Mind to file this in the tracker? Thanks

[Previous page](https://discuss.kotlinlang.org/t/cant-start-a-main-class/1243.md?page=1)
