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  How-To: Install And Configure Elasticsearch On Ubuntu 22.04

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
View Post
  • Computing
  • Multi-Cloud
  • Technology

Pulsant targets partner diversity with new IaaS solution

  • May 23, 2025
View Post
  • Computing
  • Multi-Cloud
  • Technology

Growing AI workloads are causing hybrid cloud headaches

  • May 23, 2025
Gemma 3n
View Post
  • Technology

Announcing Gemma 3n preview: powerful, efficient, mobile-first AI

  • May 22, 2025
View Post
  • Computing
  • Multi-Cloud
  • Technology

Google is getting serious on cloud sovereignty

  • May 22, 2025
oracle-ibm
View Post
  • Solutions
  • Technology

Google Cloud and Philips Collaborate to Drive Consumer Marketing Innovation and Transform Digital Asset Management with AI

  • May 20, 2025
View Post
  • Computing
  • Multi-Cloud
  • Technology

Hybrid cloud is complicated – Red Hat’s new AI assistant wants to solve that

  • May 20, 2025
View Post
  • Computing
  • Multi-Cloud
  • Technology

Cloud adoption isn’t all it’s cut out to be as enterprises report growing dissatisfaction

  • May 15, 2025
oracle-ibm
View Post
  • Hybrid Cloud
  • Technology

IBM and Oracle Expand Partnership to Advance Agentic AI and Hybrid Cloud

  • May 6, 2025

Stay Connected!
LATEST
  • 1
    Pulsant targets partner diversity with new IaaS solution
    • May 23, 2025
  • 2
    Growing AI workloads are causing hybrid cloud headaches
    • May 23, 2025
  • Gemma 3n 3
    Announcing Gemma 3n preview: powerful, efficient, mobile-first AI
    • May 22, 2025
  • 4
    Google is getting serious on cloud sovereignty
    • May 22, 2025
  • oracle-ibm 5
    Google Cloud and Philips Collaborate to Drive Consumer Marketing Innovation and Transform Digital Asset Management with AI
    • May 20, 2025
  • 6
    Hybrid cloud is complicated – Red Hat’s new AI assistant wants to solve that
    • May 20, 2025
  • notta-ai-header 7
    Notta vs Fireflies: Which AI Transcription Tool Deserves Your Attention in 2025?
    • May 16, 2025
  • 8
    Cloud adoption isn’t all it’s cut out to be as enterprises report growing dissatisfaction
    • May 15, 2025
  • college-of-cardinals-2025 9
    The Definitive Who’s Who of the 2025 Papal Conclave
    • May 7, 2025
  • conclave-poster-black-smoke 10
    The World Is Revalidating Itself
    • May 6, 2025
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-ibm 1
    IBM and Oracle Expand Partnership to Advance Agentic AI and Hybrid Cloud
    • May 6, 2025
  • 2
    Conclave: How A New Pope Is Chosen
    • April 25, 2025
  • Getting things done makes her feel amazing 3
    Nurturing Minds in the Digital Revolution
    • April 25, 2025
  • 4
    Canonical Releases Ubuntu 25.04 Plucky Puffin
    • April 17, 2025
  • 5
    United States Army Enterprise Cloud Management Agency Expands its Oracle Defense Cloud Services
    • April 15, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.