We can start a jar inside another jar and get the result by below code.
Process proc = new ProcessBuilder("java", "-XMx8192M", "-jar", "test.jar").start();
int result = proc.waitFor();
You can get details of ProcessBuilder from below.
https://docs.oracle.com/javase/10/docs/api/java/lang/ProcessBuilder.html
No comments:
Post a Comment
Thank You for your valuable comment