Accessing the kotlin compiler in IntelliJ from command prompt
Answered
I guess that intellij internally calls some Kotlin compiler to compile Kotlin codes . I wanted to know the name of that file and its general location so that I can call it from windows command prompt .
May I know the location of that compiler's .exe file so that I can call it from windows command prompt ?
Thanks in advance ..
Please sign in to leave a comment.
Hello,
See this answer on StackOverflow:
When you run your application from the IDE, in the
Runwindow the very first line is the command that the IDE executes to start your program. In my case it's something like:You can execute the same command in your terminal and that will execute the application. Reading that line will also (indirectly) tell you where the
kotlinccommand is installed, and in my case – using MacOS – it's at/Applications/IntelliJ\ IDEA.app/Contents/plugins/Kotlin/kotlinc/bin/kotlincHowever, you can always decide to entirely stop using the IDE and compile/run your program from the command line by following instructions here: https://kotlinlang.org/docs/tutorials/command-line.html
@Konstantin : Thanks a lot ..Will check and follow back with you