How do I make a picoCLI project into a command?

Viewed 309

I have a working project with command line variables. It works when I run it In IntelliJ with the command line options, how do I make it into a full terminal command?

1 Answers

The picocli user manual has two sections that may be relevant:

Running it (from the command line, not from the IDE) is important to ensure you know exactly what the classpath is, what the fully qualified main class is etc.

Packaging has to do with creating a distribution. This can be as simple as creating a unix alias, but more robust options are creating a launcher script, or compiling your application into a native executable with GraalVM. The article Build Great Native CLI apps in Java with GraalVM and picocli gives a lot of details and pitfalls on creating a native executable.

Related