So to not repeat myself too much, please refer to serve static image along side java google-enpoint api.
As you can see from the referenced link, I am able to view the image through the url. However, when I am trying to read filenames using similar code to
public void listFilesForFolder(final File folder) {
for (final File fileEntry : folder.listFiles()) {
if (fileEntry.isDirectory()) {
listFilesForFolder(fileEntry);
} else {
System.out.println(fileEntry.getName());
}
}
}
final File folder = new File("/home/you/Desktop");
listFilesForFolder(folder);
I get a security exception
java.security.AccessControlException: access denied ("java.io.FilePermission" "/myImages" "read")
Does anyone know the fix? How come the call thru the browser show the image and yet a call from within the server itself throws an exception? I find that strange.