[JAVA] Building a Kotlin development environment using SDKMAN

I needed to develop it in Kotlin, so I summarized it as a memorandum.

Describes the installation of SDKMAN, Kotlin, Gradle, etc.

What is SDKMAN

It's like a JVM-based rbenv.

You can enjoy the same advantages (installation and switching of multiple versions) as the env system such as rbenv.

It seems that it can be used only on UNIX.

Installing SDKMAN

Please change the bash part to your shell.

$ curl -s https://get.sdkman.io | bash
$ exec $SHELL -l

Install Kotlin

$ sdk install kotlin

Operation check

Prepare the file

hello.kt


fun main(args: Array<String>) {
    println("Hello, World!")
}

compile

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

Run

$ java -jar hello.jar

Gradle installation

$ sdk install gradle

Create a project using Gradle

$ gradle init

You will be asked variously, so select as you like.

Bonus (commands that you are likely to use)

Versioned installation

$ sdk install kotlin 1.2.71

Version specification uninstall

$ sdk uninstall kotlin 1.2.71

switching

$ sdk default kotlin 1.2.71

List display

$ sdk list kotlin

reference

Recommended Posts

Building a Kotlin development environment using SDKMAN
Building a Lambda development environment in Eclipse
[Ruby] Building a Ruby development environment on Ubuntu
Try to build a Java development environment using Docker
A memo when building a Rails 5.2 development environment using Docker Desktop + WSL2 on Windows 10 Home
[For beginners] Until building a Web application development environment using Java on Mac OS
Docker × Java Building a development environment that is too simple
Procedure for building a Rails application development environment with Docker [Rails, MySQL, Docker]
Notes on building Kotlin development environment and migrating from Java to Kotlin
Build a browser test environment using Capybara in the Docker development environment
Create a web environment quickly using Docker
Building a Deep Learning environment (Ubuntu 20.04 LTS)
Let's create a Java development environment (updating)
Build a Java development environment on Mac
Build a Wordpress development environment with Docker
Build a simple Docker + Django development environment
Building a development environment for Flutter on Win10 --- Flutter SDK Install (2020 preservation version)
Build a hot reload development environment with Docker-compose using Realize of Go
Build a development environment for Docker + Rails6 + Postgresql
Let's get started with Java-Create a development environment ②
Building a CICD pipeline using Docker (personal memorandum)
Building a Ruby environment for classes on Mac
Build a WordPress development environment quickly with Docker
Write to a file using ShiftJIS-Read a file (Kotlin / JVM)
Build a Kotlin app using OpenJDK's Docker container
Java development environment
Development environment construction using IntelliJ IDEA + Maven + Tomcat 9
Build a simple Docker Compose + Django development environment
[Win10] Build a JSF development environment with NetBeans
Allow development in Eclipse environment using iPLAss SDK
A reminder of Docker and development environment construction
Build a development environment for Docker, java, vscode
Points stuck in building VSCode & Java development environment
Django development environment construction using Docker-compose (personal memorandum)
Create a Spring Boot development environment with docker
Build a Java development environment with VS Code
Install Ubuntu 20.04 in virtual box on windows10 and build a development environment using docker
Build a local development environment for Open Distro for Elasticsearch with multiple nodes using Docker
Learn the meaning of "passing the PATH" by building a Java development environment on Mac
I tried using a database connection in Android development
Build a Ruby on Rails development environment on AWS Cloud9
Let's create a gcloud development environment on a centos8 container
Create a Java, JavaScript team development environment (problem raising)
[Environment construction] Build a Java development environment with VS Code!
[2021] Build a Docker + Vagrant environment for using React / TypeScript
A story I was addicted to before building a Ruby and Rails environment using Ubuntu (20.04.1 LTS)
java development environment construction
DSL development using ANTLR 4.7.1
I tried to create a java8 development environment with Chocolatey
Building an environment for copying the book "Test Driven Development"
Difficulties in building a Ruby on Rails environment (Windows 10) (SQLite3)
I made a development environment with rails6 + docker + postgreSQL + Materialize.
Build a "Spring Thorough Introduction" development environment with IntelliJ IDEA
Create a Java and JavaScript team development environment (gradle environment construction)
I tried to create a padrino development environment with Docker