How are you compiling?
shell script or ant build?
In either case, your .java file has imported the code but the build
script or ant build doesn't know where to find java.io.File. You'll
have to pass in the .jar location to the script or ant build file.
If you do that on the client-side of your application, you should
ask yourself, how you would do that with Javascript. If you can
come up with an answer (you can't without the use of signed applets
or other tweaks), the compiler can't either.
This is a question that has been answered so many times already
that searching for the error-message, in this group should bring
up a lot of results, including ways how to solve your problem
(that is dependent if you really want to have a file-list of the
files residing on the client-side or if you want ot list files
residing on the server-side).
Regards, Lothar