import files to database
<p>i have a method in java that opens an excel file and copies it into a database. This works fine.</p>

<p>What i want to do is write a java service that looks for new files in a folder and then calls my method as outlined above renames the file to Done-originalfilename.xls.
Then the service loops constantly looking for files that are not named with Done-*</p>

<p>How do i write a service in java to do this. i am coming from a Microsoft background where i would just write a windows service. What is the equivalent in java and any example to create a service that loops based on a timer to look for new files would be brilliant.</p>

<p>thanks</p>
