Elide bundles JDK 25 with a build tool, Maven dependency resolver, JUnit runner and formatter in one binary.
Run the same code
A source file with a main method compiles and runs directly:
elide run Main.javaelide java, elide javac, elide jar and elide javadoc run the JDK 25 tools without a JDK install. Their
arguments go after --:
elide javac -- -d out Main.java
elide java -- -cp out Main
elide jar -- --create --file app.jar -C out .
elide java -- -versionThe distribution’s bin/ holds java, javac, jar, javadoc and javap, so an existing build can use it as
JAVA_HOME; see JVM Toolchain.
A project is an elide.pkl file, which also lists Maven dependencies:
amends "elide:project.pkl"
jvm { main = "com.example.Hello" }
dependencies {
maven {
packages { "com.google.guava:guava:33.4.8-jre" }
}
}elide init --plain --skip-defaults --template java # new project
elide install # resolve Maven dependencies
elide build # compile and assemble
elide test # run JUnit tests
elide run # run jvm.main
elide format -- src # Google Java FormatJUnit is on the test classpath without a declared dependency. See Java and Kotlin with Elide,
Testing and the elide.pkl reference.
What changes
| With a JDK, Maven or Gradle | With Elide |
|---|---|
| Install a JDK | Nothing; JDK 25 is bundled. |
javac -d out Main.java | elide javac -- -d out Main. |
java Main.java | elide run Main.java |
pom.xml, build.gradle | elide.pkl |
| Resolve dependencies | elide install; elide install -p . reads a pom.xml. |
mvn package, gradle build | elide build |
mvn test, gradle test | elide test |
gradle run, mvn exec:java | elide run |
Maven goals on an existing pom.xml | elide mvn -- package; see Native Maven. |
Migrate ./gradlew or mvn builds | elide adopt; see Adopt an Existing Project. |
native-image | elide native-image -- -cp app. |
google-java-format | elide format |
| IDE project import | elide project export --format= or --format=pom |
Benchmarks
No benchmarks are published for JVM programs in 1.6.0. For ahead-of-time builds, see Native Image.
Strengths
- One binary replaces the JDK, Maven resolver, JUnit launcher and Google Java Format.
elide.pkldeclares dependencies, tests and artifacts without plugins.- Annotation processors run in
elide buildandelide javacfrom aprocessorsbucket.
Weaknesses
- No Gradle support:
elide builddoes not readbuild.gradleorbuild.gradle.kts, and Gradle plugins have no equivalent. elide install -p .does not merge POM parents or imported BOMs; versions inherited from a parent are dropped.- No
jlink,jpackageorjshellcommand, and JavaFX is not included. elide adoptis untested on multi-module and Android projects.- javac jtreg tests: 99.9% pass (1 fail, 2 errors); see the Compatibility Matrix.
- JDK tool arguments go after
--:elide javac -d out Main.javaexits2.