kwenza-run(1)
DESCRIPTION
Builds the project (see kwenza-build(1)), then runs [package] main-class in a new
java process, with the compiled classes and every [dependencies] jar on its classpath. No
jar is packaged: the classes directory and the dependency jars go on the classpath directly.
The program inherits kwenza’s standard input, output and error, and kwenza exits with the same
exit code it did. kwenza’s own status lines go to standard error, so kwenza run > out.txt
captures only what the program printed.
Before starting the program, kwenza prints the command it’s about to run, compactly:
run: java -cp target/classes (+7 dependency jars) com.example.Main
With --verbose, the literal command follows underneath: the full java path and every
classpath entry.
OPTIONS
ENVIRONMENT
See kwenza(1) for the environment variables kwenza reads.
EXIT STATUS
-
0: the program exited with0. -
1: kwenza failed before starting the program, for example becausekwenza.tomlsets nomain-class, or compilation failed; the error message says what and how. -
2: the command line was invalid: an unknown command or option. -
101: kwenza hit a bug in itself. Please report it, with the output of--verbose. -
Anything else: the program’s own exit code, passed through unchanged.
The program can exit with 1, 2 or 101 itself. When kwenza is the one failing, it always prints
an error: line first.
EXAMPLES
Compile and run the project:
kwenza run
Start from a clean output directory:
kwenza clean run