There is an external program that creates an XML file, but it may take a while to create. I need my Java program to wait until the file exists before moving on.
I've been reading up a little bit about synchronized blocks, and I read that I can do something like this:
synchronized(this) {
while (!file.exists) { this.wait(); }
}
To be honest I don't really know much about synchronized tasks so I'm wondering if I'm on the right track, or if I'm way off.