Skip to content

Instantly share code, notes, and snippets.

@thebalaa
Created January 5, 2026 23:28
Show Gist options
  • Select an option

  • Save thebalaa/6d83410ad447168a658be7b6ded9a374 to your computer and use it in GitHub Desktop.

Select an option

Save thebalaa/6d83410ad447168a658be7b6ded9a374 to your computer and use it in GitHub Desktop.

Implementation Plan: itzg/native

This plan breaks down the development of the native Windows/Java implementation into independent workstreams that can be executed in parallel.

Workstream A: Asset Management & Tooling

Goal: Ensure all platform-specific binaries and assets are available.

  1. [TASK-A1] Binary Harvesting: Download and version the Windows x86_64 and arm64 builds of:
    • mc-image-helper.exe
    • mc-server-runner.exe
    • rcon-cli.exe
    • mc-monitor.exe
  2. [TASK-A2] Java Distribution Strategy: Implement a script/logic to fetch or verify a portable JDK (e.g., via mc-image-helper or a standalone script).
  3. [TASK-A3] Dependency Mapping: Create a manifest file that maps Docker environment variable names to their expected types and defaults for the bootstrapper.

Workstream B: Bootstrapper Core (Java)

Goal: Build the configuration and environment orchestration layer.

  1. [TASK-B1] Configuration Loader: Implement a Java module to parse .env files and Windows system environment variables.
  2. [TASK-B2] Environment Orchestrator: Logic to normalize configuration (e.g., converting memory strings like "2G" to bytes) and set up the process environment for downstream tools.
  3. [TASK-B3] Logging Wrapper: Implement a unified logging system for the bootstrapper that mimics the [init] output style of the original Bash scripts.

Workstream C: Deployment & Logic Porting

Goal: Port the high-level orchestration from Bash to Java.

  1. [TASK-C1] Version & Type Resolver: Port the logic from start-deploy* scripts to invoke mc-image-helper resolve-minecraft-version and determine the server type.
  2. [TASK-C2] JVM Flag Generator: Port the logic from start-finalExec (Aikar's flags, MeowIce's flags, JMX settings) into a standalone Java class that returns a list of command-line arguments.
  3. [TASK-C3] File Manifest Manager: Implement logic to ensure crucial files (eula.txt, server.properties) are generated or updated before launch.

Workstream D: Process Lifecycle Management

Goal: Handle the execution and monitoring of the server process.

  1. [TASK-D1] Runner Invoker: Implement the logic to construct the final command line and invoke mc-server-runner.exe.
  2. [TASK-D2] Signal Handling: (If not handled by mc-server-runner) Ensure the Java bootstrapper correctly propagates termination signals to the runner.
  3. [TASK-D3] Health Monitor Integration: Configure periodic calls to mc-monitor.exe to report server status to the bootstrapper/logs.

Workstream E: Packaging & UX

Goal: Create a seamless experience for Windows users.

  1. [TASK-E1] Directory Layout definition: Finalize the production folder structure.
  2. [TASK-E2] CLI Entry Points: Create start.bat and setup.ps1 scripts for easy one-click initialization.
  3. [TASK-E3] Windows Service Module: Provide a template for winsw or nssm to allow users to install the server as a background service.

Parallel Execution Mapping

The following tasks can be started immediately and independently:

  • Tooling Team: [TASK-A1], [TASK-A3]
  • Java Core Team: [TASK-B1], [TASK-B3], [TASK-C2]
  • DevOps Team: [TASK-E1], [TASK-E2]

Dependencies are minimal: [TASK-D1] depends on [TASK-C2] being completed. [TASK-C1] depends on [TASK-A1].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment