I have a module in intellij, where I can create main methods in java which run perfectly, but when I create them in scala and attempt to run them, I get the following:

```
Error: Could not find or load main class xxx

```

My project relies on both java and scala classes. What do I need to do to allow scala main classes to run?

EDIT:

As requested, here's an excerpt of the main class I'm trying to run with scala. I know there's nothing wrong with the code because it works when I initialize the code in intellij as a scala project. The problem here is that I started with a blank project, so I don't know what magic intellij did behind the scenes to make the scala main classes run properly.

```
object WebProxyServer extends Logging {

    def main(args: Array[String]): Unit = {

        // implementation

    }

}

class WebProxyServer() {

}

```