Add jbang: single-file Java with JBang 0.132.1 on JDK 25 (deps, compact source files, Spring Boot, templates, native)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b6ZEVHGaYy15HAxRzy
This commit is contained in:
Ankur Mhatre
2026-12-01 08:20:46 +05:30
co-authored by Claude Sonnet 5.5
parent 7c677a39d2
commit ddc3ec9d90
34 changed files with 639 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
//JAVA 21
void main() {
System.out.println("compact source file on Java 21");
}
+8
View File
@@ -0,0 +1,8 @@
//JAVA 25+
//DEPS info.picocli:picocli:9.9.9
public class MissingDep {
public static void main(String[] args) {
System.out.println("never reached");
}
}
+6
View File
@@ -0,0 +1,6 @@
//JAVA 99
public class NeedsJava99 {
public static void main(String[] args) {
System.out.println("never reached");
}
}
+29
View File
@@ -0,0 +1,29 @@
//JAVA 25+
//DEPS org.springframework.boot:spring-boot-dependencies:4.2.0@pom
//DEPS org.springframework.boot:spring-boot-starter-webmvc
//RUNTIME_OPTIONS -Dserver.port=8090 -Dspring.main.banner-mode=off
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* A whole Spring Boot web application in a single file. The BOM (@pom) pins every
* Spring Boot dependency, so the starter needs no version of its own.
*/
@SpringBootApplication
@RestController
public class SpringDefaultPackage {
@GetMapping("/hello")
String hello() {
return "Hello from a single-file Spring Boot app";
}
public static void main(String[] args) {
SpringApplication.run(SpringDefaultPackage.class, args);
}
}