Kotlin and Java from cmd

Hello,
I’m trying to compile a Kotlin file from cmd as it uses System.console function.
But it is throwing an error “error: unresolved reference: java”. It is also been thrown when I’m trying to import any java standard class from Kotlin REPL.
But java programs are working fine.
My classpath is C:\jython*;C:\Java\jdk\lib*;C:\Java\jdk*;C:\Java\jre\lib*.

The program is getting compiled from Intellij Idea but it does not support console functions.
Thank you.