cheerpjRunJar
Execute the main class of a JAR
async function cheerpjRunJar( jarName: string, ...args: string[]): Promise<number>;
Parameters
- jarName (
string
) - The location of the jar in the virtual filesystem. - ..args (
string[]
, optional) - Arguments to pass to the main method.
Returns
cheerpjRunJar
returns a Promise which resolves with the exit code
of the program.
0
indicates success, any other value indicates failure.
Examples
Basic usage
const exitCode = await cheerpjRunJar("/app/application.jar");console.log(`Program exited with code ${exitCode}`);
Command line arguments
await cheerpjRunJar("/app/application.jar", --version");