Tina Smith wrote:Google says you should try:
for the tree,
for the tabbed pane (project/files/server),
for the split pane.
Tom Reilly wrote:You have a System.out.println(file[i].getAbsolutePath()); What is the output when you run the test? Here's an ancient question: does your computer have a floppy drive that File.listRoots() recognizes as the A: drive? Come to think of it, your original code started by looking for the A: drive. The floppy drive is notoriously slow. I guess another question is does File.listRoots() return the File instances in order (C: drive before D drive)? Since the test returns true, I'm guessing that file[i] + "filestorage" returns C:\filestorage (and path delimiters is not the problem).
Tom Reilly wrote:There is a File.listRoots() method. Have you tried that? My guess is that the way you are doing it, the slowness is when you query the drives that don't exist. Can you change the code so that you can time each query rather than all 26 at once?
David Newton wrote:Don't redeploy, or don't save the pictures to the web app context.
Personally, I'd choose option #2.
David Newton wrote:You're saving them to the app's root + directory?
Then it's a redeploy issue. You can either change how it's deployed, or don't save the pictures to the web app context.
David Newton wrote:You're most likely not saving the picture files where you believe you are, or they're getting deleted on a redeploy.