Java Service to take input as Directory

hai experts,
can anybody tell me how to write a java service so that when we give input a current directory ,the files in directory should be displayed as output in the order of date.please help me as soon as possible

Hello,

Yemi Bedu