Skip to content

Instantly share code, notes, and snippets.

@kaustavray21
Last active July 20, 2025 14:46
Show Gist options
  • Select an option

  • Save kaustavray21/77f389e5d9ad7ff15e06be8f615dfa15 to your computer and use it in GitHub Desktop.

Select an option

Save kaustavray21/77f389e5d9ad7ff15e06be8f615dfa15 to your computer and use it in GitHub Desktop.

Setting Up VS Code for Kotlin Development

  1. Setting Up the Latest JDK
    Download the latest JDK from: https://www.oracle.com/in/java/technologies/downloads/
    Open the installer after downloading and follow the installation instructions.

  2. Setting Up the Kotlin Compiler
    Run the following commands in PowerShell to set up the Kotlin compiler:

    2.1 Download the Zip File

      Invoke-WebRequest -Uri "https://github.com/JetBrains/kotlin/releases/download/v1.9.24/kotlin-compiler-1.9.24.zip" -OutFile "kotlin-compiler.zip"
    

    2.2 Unzip the Archive

      Expand-Archive -Path "kotlin-compiler.zip" -DestinationPath "."
    

    2.3 Update Path Environment Variable

    $kotlinPath = (Get-Item -Path ".\kotlinc\bin").FullName
    

    2.4 Add the Path to Your User's Path Variable

    [System.Environment]::SetEnvironmentVariable('Path', [System.Environment]::GetEnvironmentVariable('Path', 'User') + ';' + $kotlinPath, 'User')
    

    2.5 Verify Kotlin Installation:
    Restart PowerShell. Check the Kotlin version by running:

      kotlinc -version
    
  3. Setting Up VS Code

Download Visual Studio Code from: VS Code Download Install it to the default path: C:\Users\Program Files

  1. Adding Extensions

    Open VS Code and search for the following extension in the Extensions Marketplace:

    Name: Kotlin on VSCode
    Id: sethjones.kotlin-on-vscode
    Description: Pack of extensions to enable development using Kotlin on VSCode
    Version: 0.0.1
    Publisher: sethjones

    Install the extension. Optionally, configure keyboard shortcuts (e.g., Shift + F10 to run code with Code Runner).

  2. Your VS Code is now configured for efficient Kotlin development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment