# Quickstart

> Make a Java service, build it, test it and run it on your machine, in ten minutes.

Make a service, build it, test it and run it. You need a terminal and plinto, which needs Java 23 or newer to run; plinto brings every other toolchain itself. [Install and sign in](install.md) first if you haven't.

**Make a workspace**
A workspace is the folder your projects live in. It builds against one revision of a version group; your organization starts with one called `main`.

```sh
$ plinto workspace create shop --version-group main
Created shop/plinto-workspace.conf (acme's version group main at revision 299)
$ cd shop
```

```conf file=shop/plinto-workspace.conf
{
  organization = acme
  version-group = main@299
  projects = []
}
```

Yours names your organization, and another revision: your group's newest when you run the command.

**Create a service**
`plinto create` writes a project that builds at once: its `plinto.conf`, a little code and a test.

```sh
$ plinto create java-service HelloApp
Created src/HelloApp/plinto.conf
Created src/HelloApp/src/helloapp/Main.java
Created src/HelloApp/tst/helloapp/MainTest.java
Added HelloApp to the projects of plinto-workspace.conf
Build it with: plinto build -p src/HelloApp
```

```conf file=src/HelloApp/plinto.conf
{
  name = HelloApp
  version = 1.0   # a version line: releases are 1.0-1, 1.0-2, ...
  build = JavaBuild
  main = helloapp.Main   # what `plinto run` starts, the jar's Main-Class
  # args = [--port, 8080]   what it starts with, for `plinto run` and the packaged program

  build-dependencies: {
    JavaBuild = 1.0
    Java = 25
  }

  dependencies: {
    # LibOne = 1.0         a repository package, or the workspace project named LibOne
    # Slf4jApi = 2.0.17    a Maven artifact the version group imported: plinto import maven org.slf4j:slf4j-api:2.0.17
  }

  test-dependencies: {
    JUnitJupiter = 6
  }
}
```

`JavaBuild` is the build system, and `Java = 25` the JDK: both are packages, and `create` asked your group which versions it has, so they always match it. Other languages have their own templates, such as `kotlin-service`, `go-service`, `rust-service`, `python-service` and `node-service`: see [Languages](../languages/java.md).

**Build and test it**
The first build downloads the JDK and the build system your group pins. Nothing comes from your machine, so a colleague's laptop and plinto's own build machines build it the same way.

```sh
$ plinto build -p src/HelloApp
Building HelloApp 1.0 with JavaBuild
> resolveBuildDependencies
Version group main at revision 299 from https://repository.plinto.build
…
> compileJava
  compiled 1 file(s)
…
> test
  └─ JUnit Jupiter ✔
     └─ MainTest ✔
        └─ greets() ✔
…
> jar
  build/libs/HelloApp-1.0.jar
BUILD SUCCESSFUL in 2.1s
```

The jar and the test results are in `src/HelloApp/build/`. Nothing else uses them: that is what [`plinto release`](../reference/cli/release.md) is for.

**Run it**
`plinto run` builds without tests and starts the service. What follows `--` goes to your program.

```sh
$ plinto run -p src/HelloApp -- world
…
BUILD SUCCESSFUL in 1.0s
Running as region my-local-1, environment local, stage local
Hello, world!
```

The region, environment and stage are the ones your machine stands for. Configuration can say something different for each, and `plinto run --env beta` runs as a deployment there would.

## What you just used {#used}

Four of the ten words. Point at one to see what it means.

Workspace: the folder `shop`, on a revision of `main`
Version group: `main`, which chose every version
Project: `src/HelloApp` and its `plinto.conf`
Packages: the JDK and the build system the build downloaded

## Where to go next {#next}

- [Make one project depend on another](../concepts/workspaces.md#projects-that-need-each-other): a library next to your service
- [Add a library](../concepts/packages.md#imports): from Maven Central, Go modules, crates.io, npm or PyPI
- [Ship it](../concepts/reviews.md): a review, a build, a pipeline, the other words
