I have created a very basic database brower application. To provide the most fexibility, I allow users to enter the connection string and choose the *.jar file that contains the JDBC drivers for their database. Each JDBC driver is loaded using a custom ClassLoader that I created. The allows the user to connect to an Oracle, PostgreSql, MySQL, databases all at the same time and, by specifying the *.jar files themselves, I do not have to distribute dozens of jars with my application. When I start the application via WebStart, the the signed jar files successfully all <AllPermission>. However, when my custom ClassLoader tries to read the jar file that a user specifies, I get an AccessControlException. Specifically, the exception is being thrown when my code hits the File.isDirectory() method (The custom ClassLoader I created can be given a directory and it will pickup every *.jar file in that directory). Does anyone have any idea why my custom ClassLoader would not be able to access the jar file a user specifies? Do I have to register my custom ClassLoader with the SecurityManager in some way? Thanks, Michael.
Java EE Evangelist — Author, EJB 3 in Action 2nd Edition — Java Community Process Member