Java 27 and 26: runnable demos and captured output for every JEP, plus version lanes

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01B38FGKKam5SCGgwgduVAh3
This commit is contained in:
2026-09-21 14:47:46 +00:00
committed by Claude
co-authored by Claude Sonnet 5
commit da55954922
150 changed files with 4968 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
// Gradle (build.gradle.kts): the toolchain block from the upgrade guide
plugins {
java
application
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(25))
}
}
application {
mainClass.set("demo.App")
}
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ankurm.demos</groupId>
<artifactId>upgrade-demo</artifactId>
<version>1.0</version>
<properties>
<!-- Maven (pom.xml): the three properties the upgrade guide sets to 25 -->
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
<maven.compiler.release>25</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
+1
View File
@@ -0,0 +1 @@
rootProject.name = "upgrade-demo"
+12
View File
@@ -0,0 +1,12 @@
package demo;
/**
* The smallest class that proves a build targets Java 25: it prints the Java version of the JVM it runs on.
* Explained in docs/15-build-files.md. The build files next to it (pom.xml, build.gradle.kts) are the ones
* quoted in the "Step 1" section of the upgrade guide.
*/
public class App {
public static void main(String[] args) {
System.out.println("running on Java " + Runtime.version().feature());
}
}