Forrest logo
tool overview
On this page you find all important commands for the CLI tool kotlinc. If the command you are looking for is missing please ask our AI.

kotlinc

Kotlinc is a command line tool provided by JetBrains, the creators of Kotlin programming language. It is used to compile Kotlin source code files into bytecode, which can then be executed by the Java Virtual Machine (JVM). Kotlinc supports the full range of Kotlin language features, including its object-oriented and functional programming capabilities. It is available for Windows, macOS, and Linux operating systems, making it accessible to developers on various platforms. Kotlinc can be used to compile individual Kotlin files or entire projects, making it suitable for both small and large scale development. It provides a straightforward and efficient way to convert Kotlin code into Java bytecode, allowing seamless interoperability with existing Java codebases. Kotlinc also offers advanced features like incremental compilation, which allows for quicker compilation times in large projects by only recompiling changed files. It includes built-in error checking and reporting, providing detailed information about any syntax or semantic errors in the code. Additionally, Kotlinc allows for the generation of various output formats, such as executable JAR files or Kotlin script files. Overall, kotlinc is an essential tool for Kotlin developers as it enables them to compile and run Kotlin programs efficiently and effectively.

List of commands for kotlinc:

  • kotlinc:tldr:01b8f kotlinc: Start a REPL (interactive shell).
    $ kotlinc
    try on your machine
    explain this command
  • kotlinc:tldr:09d7b kotlinc: Compile a Kotlin file.
    $ kotlinc ${filename-kt}
    try on your machine
    explain this command
  • kotlinc:tldr:703e0 kotlinc: Execute a specific Kotlin Script file.
    $ kotlinc -script ${filename-kts}
    try on your machine
    explain this command
  • kotlinc:tldr:d4290 kotlinc: Compile a Kotlin file into a self contained jar file with the Kotlin runtime library included.
    $ kotlinc ${filename-kt} -include-runtime -d ${filename-jar}
    try on your machine
    explain this command
tool overview