title: Error trying to instantiate a Kotlin class from Java
body: <p>I am trying to instantiate a Kotlin class from Java but every time I try to compile with Maven I get the error <code>cannot find symbol</code>:</p>
  
  <pre><code>class ConfigCommand(private val game: Game) : Command("config", "") {
  
    init {
      addAliases("cfg")
    }
  
    override fun getRequiredRank(): Rank? {
      return null
    }
  
    override fun getDescription(): String {
      return "Shows the config for the game"
    }
  
    @Throws(CommandException::class)
    override fun execute(sender: CommandSender, args: Array&lt;String&gt;): Boolean {
  
      if (args.isEmpty()) {
          if (sender !is Player)
              throw NoConsoleAccessException()
          sender.openInventory(ConfigGUI(game).build())
          return true
      }
  
      return false
    }
  }
  </code></pre>
  
  <p>Not sure why that didn't format correctly but anyway before I converted it to a Kotlin class it worked but I need to register this command in my main class which is a Java class. When I try to instantiate a Kotlin class from a Java class there are no errors in the IDE but when I go to compile it maven screams</p>
  
  <pre><code>cannot find symbol
  [ERROR] symbol:   class ConfigCommand
  </code></pre>