accessing xml files created during runtime
I'm trying to run a script that creates an xml output file each time it is run and then access that xml file as soon as the script has stopped running. I am using the exec() method to run the script, which works fine. The issue I'm having is that the output files don't appear (in browser) until the execution of java is stopped. I have tried using the Thread.sleep() method in case the script wasn't finishing entirely, but it seems that no matter how long I wait, the xml file is only created when the java program stops execution. Is there any work around for this?