VulCode

Java: what we build with it and why

We write Java mainly for Minecraft: plugins for Paper, Purpur and Folia. Outside games we use it in Spring Boot services.

All technologies

When Java, and when something else

A technology has to fit the place the code will run and the team that will take it over. The final choice is made in the quote, together with you.

We pick Java

Plugins for Paper, Purpur and Folia

Frozcraft runs on Paper and Folia from one codebase. An action about a player runs on that player's region thread, so the plugin does not hang the server.

Store deliveries into the game

Frozcraft receives purchases from the Flaem store over a Unix socket and hands them to players in the game. The socket is reachable only on that machine, so the plugin opens no port to the internet.

Requests off the game thread

The plugin collects player stats and runs actions on players. HTTP requests land on Java virtual threads, never on the thread that runs the server's ticks.

Add-ons installed at hosting customers'

Flaem add-ons install on the hosting customers' game servers. Such a server already runs on Java, so an add-on is one jar file with no extra runtime.

Bookings without double slots

slotline books rooms, courts and equipment on Spring Boot with PostgreSQL. A resource lock inside the transaction and a concurrency test make sure two people cannot take the same slot at once.

Services with a documented API

In slotline, Flyway migrations and springdoc-openapi docs come with the code, and Spring Security with JWT tokens guards access. Many developers know Spring Boot, so the service is easy to hand on.

This is how we write it in our services

We pick something else

Small scripts and bots

A server script and a Discord bot in Python are ready sooner and need no JVM. We keep Java for where a game or a large service needs it.

An agent running in the background

The JVM needs time to warm up and takes memory before it does anything. We write an agent for someone else's machine in Go, as one small binary.

A panel to manage the server

We write the screens for managing a game server in React and TypeScript, and the Java plugin only carries out commands in the game. The interface does not live in the server's code.

A new JVM service

When a JVM service is not a game plugin, we consider Kotlin: empty values show in the types, and the code is shorter with the same libraries.

SCP: Secret Laboratory plugins

SCP: Secret Laboratory is written in C# on Unity, so we write its plugins in C#. Java stays with Minecraft.

A hosting platform's core

The Flaem store, billing and node orchestration are in Rust, and Java works only inside the game. The core has to run for years without garbage collection pauses, and Rust has no garbage collector.

Java compared, point by point

Each need on a row of its own, with what each of the two columns gives you on it side by side.

ProjectJavaKotlin

A Minecraft plugin

The most examples and libraries
Works too

A new JVM service

Spring Boot
Shorter code

Empty values

Optional and annotations, no compiler guarantee
Told apart in the types

Paper and Folia documentation

Written with Java in mind
Examples need translating

Concurrency

Virtual threads
Coroutines

Plugin size

A small jar with nothing extra
Larger, with the Kotlin standard library

People to maintain it

The easiest to staff
Fewer people, but they read Java easily

Java in all our code

How many lines we have written in Java, and what part of everything we have written that is. We count the lines added in the commits of our repositories, language by language.

13,788
lines written in Java
0.3%
of all the lines we have written
3
repositories with Java code
20th
place among 26 languages

The libraries these projects stand on

From the dependency files of our repositories. With each, one sentence on what we use it for.

A Minecraft server in the Flaem panel: resource use, the live console and players
An invitation to a Minecraft server in the Flaem app: the server address and how to join
  • Paper API

    Minecraft plugins.

  • Gradle

    Building plugins.

  • Spring Boot, JPA, Flyway

    The booking service.

  • springdoc-openapi

    API documentation.

Other technologies, and where their code runs

Each has its own page with projects on real screens and a comparison with the alternatives.

Websites and web apps

What you see in a browser, and its back end.

Mobile apps

Native Android and iOS clients.

Desktop apps

Programs for Windows, macOS and Linux without a browser inside.

Back end and infrastructure

Cores, server agents and real-time services.

Bots and automation

Discord, scripts and monitoring.

Questions about Java

Answers about Java, our projects and the numbers on this page.

A project in Java?

Describe what you want to build. We reply within an hour and tell you plainly whether this technology is a good choice.