AccessController checkPermission always throws exception
===

How do you check if the application has permission to read or write to specific directories on the filesystem. I am trying this:

    try{
	            	AccessController.checkPermission(new FilePermission(files[i].getAbsolutePath(), "read,write"));
	            	
	            }
	            catch(Exception e){
	            	System.out.println(e.toString());
	            }
but it always throws the exception and outputs:

> 
java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Dell" "read")
java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Documents and Settings" "read")
java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\glut-3.7.6" "read")

Is there something I'm missing here?