I have a funny requirement here, I have an already existing java program for which I have to write an automation in java. I have to show the merged output for both the programs as a report.
The output should be somewhat like this:
Output from program1 after executing line1
Output from myAutomation after executing line1
Output from program1 after executing line2
Output from myAutomation after executing line2
Output from program1 after executing line2
Output from myAutomation after executing line2
How can I achieve this in java? AFAIK, each java program runs separately in JVM and is isolated, so is this kind of stuff possible at all?