Name.java void main() { System.out.println("Hello JBang!"); Name name = new Name(); System.out.println("Hello " + name.getName()); } Hello.java $ jbang --enable-preview Hello.java [jbang] Building jar for Hello.java… Note: /mnt/c/Files/java/quarkus/Hello.java uses preview features of Java SE 21. Note: Recompile with -Xlint:preview for details. Hello JBang! Hello Kouki Miura JBangとは https://github.com/jbangdev/jbang
= new Name(); System.out.println("Hello " + name.getName()); } Hello.java $ jbang --enable-preview Hello.java [jbang] Building jar for Hello.java… Note: /mnt/c/Files/java/quarkus/Hello.java uses preview features of Java SE 21. Note: Recompile with -Xlint:preview for details. Hello JBang! Hello Kouki Miura public class Name { public String getName() { return "Kouki Miura"; } } Name.java jbang実行結果 JBangの特徴① 複数ファイル