Knowing when a file writting has ended

I am writting to a file, from a java application.
The file is big so multiple flush will occur during the writting. That file will be used by another application(Cold Fusion), that will read it and do it's job. What I need is a way of letting the ColdFusion alllication know that the writting to the file has finished and the file is ready for use.
I know I could read the file from ColdFusion and check for something at the end that will tell me the file is OK, but the file is big. I am looking for some suggestions.
Thanks.

how about creating a second file as a "flag" to coldfusion?
so at the end of your large file write activity you could just write another tiny file... meanwhile coldfusion could wait in a loop until that "flag" file exists

That's one of the solutions I had in mind, together with another one that is, reading the date when the big file is created, then loop reading the date untill it changed(I have tested writting the file from a java application and the date is changed only when I close the stream to the file. Flushing the buffer does not change the date, even if it does write to the file.
Sorry, I should have posted all that from the begining.
So what I am looking for is if someone has some other solution that would work better, or if someone can see some problems with the ones I have allready presented.
Thanks.

what don't you like about that solution?
i don't know what kind of support for sockets cold fusion has but you could open a socket between the two apps to communicate
files and sockets are the most common ways of communicating between processes... although i'm sure there are others as well

What is the relationship between the ColdFusion application and the Java application?

If the ColdFusion app is the parent of the Java app and it tells its child process the name of the file to write, perhaps you could do something like write to a temporary filename from the Java app and then rename to the agreed upon final file when done. The ColdFusion app could wait until the name file appears at which point it would be complete. The hole in this is, what to do if something catastrophic occurs to the Java app and the file never appears? Can the ColdFusion app know when its child terminates? Using this indication along with or instead of the temporary file scheme could round out the solution.

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…

How to fix incompatible JVM issue while installing Eclipse
While installing Eclipse in windows, got one error like above and unable to proceed with the installation.
This video describes how to successfully install Eclipse.
How to solve incompa…