1

I'm starting with kotlin on windows, I'm following the steps of Working with the Command Line Compiler

And I get the following error after trying to compile(and add the bin directory in the path of my system):

Comand compile:

$ kotlinc hello.kt -include-runtime -d hello.jar

Error:

""Java"" is not recognized as an internal or external command, program or batch file

in my windows CMD.

I need to have java installed on my pc. To start with kotlin?

user94559
  • 59,196
  • 6
  • 103
  • 103
Vitmar Aliaga
  • 35
  • 1
  • 6
  • 5
    Yes, you need to install the JDK to use Kotlin. – zsmb13 Jun 07 '17 at 16:12
  • 2
    Install java and set you environment variables - If you are using Windows 10 link is [link](https://www.mkyong.com/java/how-to-set-java_home-on-windows-10/)....For windows 7 [link](https://stackoverflow.com/questions/2619584/how-to-set-java-home-on-windows-7) – utkarsh31 Jun 07 '17 at 16:15

1 Answers1

2

Install Java 8 JDK (not JRE) on your development machine as it is a prerequisite for running the Kotlin compiler, and also for any Java or Kotlin application. You can use either the Oracle JDK for most platforms or OpenJDK for Linux platforms.

Jayson Minard
  • 84,842
  • 38
  • 184
  • 227