Create your first Hello World Desktop app using Jetpack Compose Desktop
This is a short tutorial to show you how to create your first Hello world Jetpack Compose Desktop.
This is an early access version of the product and still in preview mode, it is not recommended to build for production
In this tutorial, you will create your first Hello world Jetpack compose using the kotlin programming language, the coolest thing is it uses the same syntax and semantics used in creating the Android Native app.
So cool right? Now let's get started
Firstly, Download the Early Access version of IntelliJ from here -
Early Access Program (EAP) - IntelliJ IDEA
Code-centric IDE, focused on your productivity. Full Java EE support, deep code understanding, best debugger…
Secondly, Install the software and launch it
The next step is to click on “ New Project” to create a new Jetpack compose desktop app
In this section, click on “Kotlin” then give your project a name, choose a location or use the default position, select “Desktop” in the project template section, download a JDK if not available, or select the existing JDK. after that click on the “Next” button.
NOTE: you need Java 11 installed on your machine
The IDEA will automatically download a suitable Gradle for your project (size 102.67MB)which might take some time depending on your (service provider). after downloading the image below will show.
The template does all the setup you need. Now just simply run the code by clicking the green play button besides ( fun main() ).
Click “Run Main.kt” It opens up a java window on your machine to run a native desktop app!!
Its that's simple 😍😍😍😍😍😍.
you can make changes to the main.kt file and play around with it.
Good luck and Congratulations for creating your first Jetpack compose Desktop. kudos to the Android, Kotlin and Jetbrain Team 👍👍👌
Let’s connect on