Skip to content

Quick Start — Kotlin

One of the five Orvanta Quick Starts shown on an empty workspace’s Home page. Picking the Hello Orvanta (Kotlin) card opens this script as an unsaved draft in the script editor — nothing is deployed until you save it.

A statically typed, compiled runtime on the JVM. Orvanta scripts in Kotlin are a top-level fun main(...): arguments in, a JSON-serialisable result out.

fun main(name: String = "Orvanta"): Map<String, Any?> {
return mapOf(
"message" to "Hello, $name! This ran as a Kotlin script on Orvanta."
)
}

The name argument has a default, so the auto-generated input form makes it optional — hit Run with no input and it prints “Hello, Orvanta!”.

The first run compiles the script, so it’s noticeably slower to start than the scripting-language Quick Starts (TypeScript, Python, Bash) — that’s normal for a compiled JVM language, not a problem with the Quick Start.

  1. Open an empty workspace’s Home page and click Hello Orvanta (Kotlin) under Orvanta Quick Starts.
  2. Press Run (or Ctrl+Enter) to execute it as-is. The first run takes longer while it compiles.
  3. Edit the main function and re-run to see the change reflected.
  4. Click Deploy if you want to keep it in the workspace — otherwise navigate away and the draft is discarded.