Share Your Java CLI Apps with Ease
summary
Shows how to share small Java CLI programs as editable source plus libraries instead of full Gradle projects by using the Java single-file launcher (Java 11) together with Java 22 JEP 458 to fetch dependent classes. Packs a shell wrapper and a ZIP bundle produced by a Makefile or Gradle task to deliver a script-like runnable bundle; demonstrates with a ~240-line SQL test-data generator and notes the downside that the JVM recompiles on each run with no hot cache.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:01Fast CLI Java apps need
- 2:23Java scripting with JDK
- 3:29Shibang problems in Java
- 5:13Java 11+ solution
- 6:39Data generation example
- 7:40Sharing and packaging apps
- 8:43Makefile or Gradle usage
- 10:06Java 22 limits and changes
- 11:30Compile on each run
- 12:14Classic alternatives
- 12:44Q&A
related talks
47mJava for Small Coding Tasks
51mThe Best of Java Shorts Show: 100 Snippets in 50 Minutes
18mJBang, a Java file to rule them all? 💍
46mPicocli: put Java in your terminal!
44mThe Best of Java Shorts Shorts Show: 100 Snippets in 45 Minutes
32mjbang - Unleash the power of Java
15mAn introduction to creating CLI applications using picoCLI
45mJShell: An Interactive Shell for the Java Platform
