Yes u are right but i need to read file on the server .. i want to show pics
and the user needs to select the pics
for this i need to read all the file in a directory
Using the File.listFiles method, your applet can only list local
(client) files. If you want to scan a directory on the server, your
applet will need to get the list from the server. I'd say, the easiest
way would be a dynamic page (using PHP or a servlet) dans lists the
content of a directory (which can be passed as a parameter) and return
the list of files (with your own format that the applet knows how to
parse).
That way the applet can ask the servlet or PHP page for the listing of
a directory, parse it to get an array of file names, present it to the
user in a combo box or such, and when the user has chosen a file, get
the specific file through a regular HTTP request.
This of course is the simple way if all the files are in a single
directory on the server, and you don't need to navigate up and down
through directories.
Hope this helps