CmdID

CmdID / Commands

jbang

Easily create, edit, and run self-contained source-only Java programs. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Initialize a simple Java class

jbang init path/to/file.javaIdentify

Initialize a Java class (useful for scripting)

jbang init --template=cli path/to/file.javaIdentify

Use jshell to explore and use a script and any dependencies in a REPL editor

jbang run --interactiveIdentify

Set up a temporary project to edit a script in an IDE

jbang edit --open=codium path/to/script.javaIdentify

Run a Java code snippet (Java 9 and later)

echo 'Files.list(Paths.get("/etc")).forEach(System.out::println);' | jbang -Identify

Run command-line application

jbang path/to/file.java command arg1 arg2 ...Identify

Install a script on the user's $PATH

jbang app install --name command_name path/to/script.javaIdentify

Install a specific version of JDK to be used with jbang

jbang jdk install versionIdentify