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.
Example
const exitCode = await cheerpjRunMain("/app/application.jar");console.log(`Program exited with code ${exitCode}`);