JNative bird mascot

Java to native,
without the JVM and GC.

Compile JAR and CLASS files into standalone executables. Escape and lifetime analysis decide exactly when every object can be freed — like Rust, on top of Java, Kotlin, Scala, or Groovy.

.class / .jar → bytecode analysis → lifetime analysis → destructor insertion → LLVM IR → native executable

Why JNative

Built for developers who want compiled-language performance without leaving the JVM ecosystem.

⚡

No JVM, No Warm-up

Bytecode is translated to SSA IR, analyzed, and lowered to LLVM. The executable starts instantly — no interpreter, no JIT, no class-loading overhead.

🧹

Static Lifetime Management

Interprocedural points-to and escape analysis classify every allocation site. Destructors are inserted at last use — deterministic cleanup without a garbage collector.

🔒

Memory Safety

Heap-escaped values are paired with null-outs so overwrite instrumentation cannot double-free. Shutdown cleanup uses a claim stack to break cycles safely.

📦

Broad Input Support

Plain JARs, directories, single CLASS files, and Spring Boot fat JARs — with lazy nested-JAR indexing and on-demand class loading.

🌐

Cross-Platform

Target triples for x86-64, AArch64, RISC-V, POWER, s390x, ARMv7, and i686. Override with --target and --data-layout.

🔧

GraalVM-Compatible Metadata

Reads reflect-config.json, proxy-config.json, jni-config.json, and resource-config.json under META-INF/native-image/.

Quick Start

Build a native executable from a JAR in one command.

terminal
# Inspect a JAR
java -jar jnative.jar inspect app.jar

# Build a native executable (entry inferred from Main-Class)
java -jar jnative.jar analyze app.jar

# Choose entry, output, and dump analysis results
java -jar jnative.jar analyze app.jar \
  --entry com.example.Main \
  --output myapp \
  --alias --escape --lifetime --destructor

# Cross-compile for Windows
java -jar jnative.jar analyze app.jar \
  --target x86_64-pc-windows-msvc \
  -O3

# Generate LLVM IR without compiling
java -jar jnative.jar analyze app.jar \
  --entry com.example.Main \
  --no-compile

Supported Targets

Auto-detected from os.name / os.arch, or explicit via --target.

Family Example Triples
x86-64 x86_64-pc-linux-gnu x86_64-pc-windows-msvc x86_64-apple-darwin
AArch64 / arm64 aarch64-unknown-linux-gnu arm64-apple-darwin aarch64-pc-windows-msvc
i686 i686-pc-linux-gnu i686-pc-windows-msvc
RISC-V riscv64-unknown-linux-gnu
POWER powerpc64le-unknown-linux-gnu powerpc64-unknown-linux-gnu
s390x s390x-ibm-linux-gnu
ARMv7 armv7-unknown-linux-gnueabihf

Memory Model

Every allocation site is classified at compile time. The runtime acts on that classification.

STACK

Does not escape its defining function. Eligible for stack allocation or full scalar replacement.

HEAP

Stored in another object’s field. A destructor is inserted at last use, and the containing field is nulled.

RETURN

Returned to the caller; the caller owns it. No cleanup inside the defining function.

GLOBAL

Reachable from a static field. Released during the cycle-safe shutdown pass.

THREAD

Handed to another thread. Not released per-use; lifetime is managed by the receiving thread.

UNKNOWN

The analysis cannot classify the site. Cleanup is handled conservatively.