I am trying to run a jar in a java program and grab its stdout. I want to do this to avoid loading the JVM every time the jar starts. . What is the easiest way to do this?
I started by modifying the Java JarClassLoader and adding a SecurityManager subclass to it to prevent logging out. JarClassLoader is a subclass of URLClassLoader and it scans the main class in the bank, and then performs the main function. But now I get InvocationTargetExceptions when I try to execute this function, even if I pass the correct arguments. Anyone with an idea where to go from here?
Is there an easier way to do this?
source
share