aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • Engineering
  • Software Engineering
  • Technology

How-To: Install Kotlin on Ubuntu 22.04

  • aster_cloud
  • September 7, 2022
  • 2 minute read

Prerequisites

  • Ubuntu 22.04
  • Java is installed. See here on how to install Java on Ubuntu 22.04.

Install via SDKMAN

01. Open a terminal and install unzip and zip programs needed by SDKMAN.

SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems


Partner with aster.cloud
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

$ sudo apt update$ sudo apt install unzip$ sudo apt install zip

02.Install SDKMAN, which will be used to install Kotlin.

$ cd ~$ curl -s https://get.sdkman.io | bash

03. Run the initialization script and follow the instructions on-screen to install SDKMAN. In this example, the script is located under the /home/geek/ directory, your command will be different.

$ source "/home/geek/.sdkman/bin/sdkman-init.sh"

04. Check if SDKMAN has been installed by checking its version.

$ sdk version

05. Install Kotlin

$ sdk install kotlin

06. Verify that Kotlin is installed. The following should output the version of Kotlin installed.

$ kotlin -version

If you are greeted with the following message, then it means that Java is not installed on your system. Follow the guide here on installing Java on Ubuntu.

If installed correctly, it will show the Kotlin version.

Running Kotlin

Run a Kotlin program that shows a message to the console/output.

01. Create a file named hello-geek.kt

$ cd ~
$ nano hello-geek.kt
 

Set the content as follows

fun main() {    
  println("Hello, Geek!")
}

02. Compile the application using Kotlin. This creates a JAR (Java Archive) file

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

03. Run the application using Java

$ java -jar hello-geek.jar

Kotlin is a great language, as an alternative to using Java. If you are using the JVM and you want to use a different language aside from Java, this is a good option.

Read More  GitLab Announces First-Ever 24-hour Virtual User Event

For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

aster_cloud

Related Topics
  • Kotlin
  • Programming Language
  • Tutorials
  • Ubuntu
  • Ubuntu 22.04
You May Also Like
Birthday Cake
View Post
  • Technology

How ChatGPT Altered Our World in Just One Year

  • November 30, 2023
OpenAI
View Post
  • People
  • Technology

Sam Altman Returns As CEO, OpenAI Has A New Initial Board

  • November 30, 2023
Web
View Post
  • Engineering
  • Software Engineering

Mastering the Art of Load Testing for Web Applications

  • November 29, 2023
Ubuntu. Chiselled containers.
View Post
  • Engineering
  • Technology

Canonical Announces The General Availability Of Chiselled Ubuntu Containers

  • November 25, 2023
Microsoft. Windows
View Post
  • People
  • Technology

Ousted Sam Altman To Lead New Microsoft AI Team

  • November 20, 2023
OpenAI
View Post
  • People
  • Technology

OpenAI Announces Leadership Transition

  • November 18, 2023
Brush, Color, and Sketch pad
View Post
  • Cloud-Native
  • Design
  • Engineering

6 Security Best Practices For Cloud-Native Applications

  • November 17, 2023
View Post
  • Technology

GraphCast: AI Model For Faster And More Accurate Global Weather Forecasting

  • November 16, 2023

Stay Connected!
LATEST
  • Birthday Cake 1
    How ChatGPT Altered Our World in Just One Year
    • November 30, 2023
  • OpenAI 2
    Sam Altman Returns As CEO, OpenAI Has A New Initial Board
    • November 30, 2023
  • Web 3
    Mastering the Art of Load Testing for Web Applications
    • November 29, 2023
  • Data center. Servers. 4
    Intel Granulate Optimizes Databricks Data Management Operations
    • November 27, 2023
  • Ubuntu. Chiselled containers. 5
    Canonical Announces The General Availability Of Chiselled Ubuntu Containers
    • November 25, 2023
  • Cyber Monday Sale. Guzz. Ideals collection. 6
    Decode Workweek Style with guzz
    • November 23, 2023
  • Guzz. Black Friday Specials. 7
    Art Meets Algorithm In Our Exclusive Shirt Collection!
    • November 23, 2023
  • Presents. Gifts. 8
    25 Besties Bargain Bags Below $100 This Black Friday 2023
    • November 22, 2023
  • Electronics 9
    Top 10+1 You Can’t Do Without For The Holidays: Electronics Edition.
    • November 20, 2023
  • Microsoft. Windows 10
    Ousted Sam Altman To Lead New Microsoft AI Team
    • November 20, 2023
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • Oracle | Microsoft 1
    Oracle Cloud Infrastructure Utilized by Microsoft for Bing Conversational Search
    • November 7, 2023
  • Riyadh Air and IBM 2
    Riyadh Air And IBM Sign Collaboration Agreement To Establish Technology Foundation Of The Digitally Led Airline
    • November 6, 2023
  • Ingrasys 3
    Ingrasys Unveils Next-Gen AI And Cooling Solutions At Supercomputing 2023
    • November 15, 2023
  • Cloud 4
    DigitalOcean Currents Report Finds That Adoption Of AI/ML, And Investments In Cybersecurity And Multi-Cloud Strategies Are On The Rise At Small Businesses
    • November 9, 2023
  • Portrait of Rosalynn Carter, 1993 5
    Former First Lady Rosalynn Carter Passes Away at Age 96
    • November 19, 2023
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.