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:
co-authored by
Claude Sonnet 5.5
parent
7c677a39d2
commit
ddc3ec9d90
@@ -0,0 +1,15 @@
|
||||
///usr/bin/env jbang "$0" "$@" ; exit $?
|
||||
//JAVA 25+
|
||||
|
||||
/**
|
||||
* The classic shape: one file, one class, a static main.
|
||||
* The first line is a shebang trick so ./Hello.java works on Linux/macOS once chmod +x.
|
||||
*/
|
||||
public class Hello {
|
||||
public static void main(String[] args) {
|
||||
String who = args.length > 0 ? String.join(" ", args) : "world";
|
||||
System.out.println("Hello, " + who + "!");
|
||||
System.out.println("Running on Java " + Runtime.version().feature()
|
||||
+ " (" + System.getProperty("java.vendor") + ")");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user