I have implemented an application that process some xml input files and write more xml files as result.
I have to put this jar to run on a Raspberry Pi.
I transfer the input files from my pc to Raspberry Pi using PuTTY or WinSCP.
I have a method that read from a directory whose path I specified all the names of .xml files as filename.xml and add them into a list. Then I call other methods that process the inputFile on position 0 in list.
The inputFile is the file denoted by "path+filename".
After processing the inputFile from the position 0 in list, I delete the inputFile, and then the name from list.
My app should run permanently because the inputFiles may be sent at any time. Here is the first problem: I don't know how to make my jar permanently run.
Another problem is when there are no more files to read, because if the jar is still running, there an error will be thrown, because there are no more files.
I think I need my app to run only if there are xml file in the directory I set on Raspberry Pi, and I don't know hot to make it happen... There should be a trigger or something that make my app running only when xml files are sent to raspberry pi.