Kotlin Programming in Visual Studio Code IDE (Ubuntu)

Welcome to our tech tour! You are a genuine explorer👉

Today we are going to show you how to configure Visual Studio Code for Kotlin development.
 
Why Visual Studio Code?
 
Visual Studio Code features a lightning expeditious source code editor, perfect for our development activities. With support for hundreds of languages, VS Code avails us instantly productive with syntax highlighting, bracket-matching, auto-indentation, box-cull, snippets, and more.
Visual Studio Code fortifies macOS, Linux, and Windows - so we can hit the ground running, no matter the platform.
 
 
A quick overview of Kotlin,
 
Kotlin is a new open-source programming language targeting the Java platform. Kotlin is concise, safe, pragmatic, and fixated on interoperability with Java code. It can be used virtually everywhere Java is utilized today: for server-side development, Android apps, and much more. Kotlin works great with all subsisting Java libraries and frameworks and runs with the same level of performance as Java.
 
 
 
Step 1: How to install Java SDK?
        
Run the following command.
             
$ sudo apt install openjdk-11-jdk
 
             
Step 2: How to install Kotlin?

Run the following command.

$ sudo snap install --classic kotlin

 
Step 3: How to install Visual Studio code?
 
Download visual studio code from the official website https://code.visualstudio.com/download and install

or 

Run the following command
 
sudo apt update
sudo apt install software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key 
add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos
/vscode stable main"
sudo apt update
sudo apt install code
 

That’s it. Visual Studio Code has been installed on your Ubuntu desktop and you can commence utilizing it.

Step 4: Install extensions
 
Support for programming languages in VS Code is typically provided through extensions, which can be found in the Visual Studio Code Marketplace.
 

 
Step 5: Create a Demo.kt file with source code
 
Use Visual Studio Coded IDE and create a file called Demo.kt with the following code:

fun main() {
println("Hello Kotlin!")
}





Step 6: Compile the source code
 
sudo kotlinc Demo.kt -include-runtime -d Demo.jar
 
 
Step 7: Run the Kotlin program
 
java -jar Demo.jar
 
 


 
 
More related topics,

Java - Angular - VueJS - ReactJS

NodeJS - Angular - VueJS - ReactJS

Python - Flask  - Angular - VueJS - ReactJS

Popular posts from this blog

Spring boot video streaming example-HTML5

Learn Java 8 streams with an example - print odd/even numbers from Array and List

Spring Boot + Mockito simple application with 100% code coverage

Spring Boot + OpenCSV Export Data to CSV Example

Custom Exception Handling in Quarkus REST API

DataTable-Pagination example with Spring boot, jQuery and ajax

Registration and Login with Spring Boot + Spring Security + Thymeleaf

Node JS mini projects with source code - free download

Spring boot web project free download:User Registration System

Java - Blowfish Encryption and decryption Example