i want to get all the file names from a particular directory to a list..so how can i get it!!?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
i want to get all the file names from a particular directory to a list..so how can i get it!!?
See the File class API doc. It has methods for doing that.
If you don't understand my answer, don't ignore it, ask a question.
Take a look at the API for the File class
File (Java Platform SE 6)
In particular the listFiles methods
hey thanks Norm and copeg..i got how to do it!!
hey i am using java swing in my program.so this class File is not working in swing so what should i use in swing to get all files from a particular directory?
Can you explain what "not working" means. The File class will work in a Swing application.this class File is not working
Please post the full text of the error messages and the code that is causing the error.
If you don't understand my answer, don't ignore it, ask a question.