Suppose I have a Java program Test.class, if I used the below script
for i in 1..10
do
java Test
done
the JVM would exit each time java Test is invoked.
What I want is running java Test multiple times without exiting the JVM, so that, the optimized methods in prior runs can be used by later runs, and possibly be further optimized.
This should do it. You can call the Test class’ main function with the same arguments you pass to your main function. This is the “wrapper” that another poster referred to.