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,29 @@
|
||||
# native-image 25.0.4 2026-07-21
|
||||
$ jbang --native Hello.java Native
|
||||
[jbang] Building jar for Hello.java...
|
||||
[jbang] log: /tmp/jbang18248476024474165891native-image
|
||||
Hello, Native!
|
||||
Running on Java 25 (Oracle Corporation)
|
||||
[wall clock: 154.486s]
|
||||
|
||||
$ jbang --native Hello.java Native # second run, binary cached
|
||||
Hello, Native!
|
||||
Running on Java 25 (Oracle Corporation)
|
||||
[wall clock: 1.350s]
|
||||
|
||||
$ ls -la $JBANG_DIR/cache/jars/Hello.java.*/
|
||||
7696
|
||||
4096 .
|
||||
4096 ..
|
||||
7866632 Hello.bin
|
||||
1895 Hello.jar
|
||||
|
||||
$ Hello.bin Native # the cached binary, no JBang, no JVM
|
||||
Hello, Native!
|
||||
Running on Java 25 (Oracle Corporation)
|
||||
[wall clock: 0.005s]
|
||||
|
||||
$ java -cp Hello.jar Hello Native # same program on the JVM
|
||||
Hello, Native!
|
||||
Running on Java 25 (Oracle Corporation)
|
||||
[wall clock: 0.277s]
|
||||
Reference in New Issue
Block a user