Thread View: borland.public.jbuilder.java.swing
1 messages
1 total messages
Started by Sven Goetgeluck
Wed, 18 Feb 2004 12:54
filepermission
Author: Sven Goetgeluck
Date: Wed, 18 Feb 2004 12:54
Date: Wed, 18 Feb 2004 12:54
25 lines
1529 bytes
1529 bytes
Hi,
I want to check wether i can write in a directory
using following codesnippet
try {
String curDir = System.getProperty("user.dir");
AccessController.checkPermission(new FilePermission("C:\\tempie\\-",
"read"));
System.out.println("Writing and reading permission on :"+ curDir);
// Has permission
} catch (SecurityException e) {
String curDir = System.getProperty("user.dir");
System.out.println("No writing or reading permissions on "+ curDir);
// Does not have permission
}
But allways throws the exception what can be wrong?
even if i use the curDir string it goes wrong
Sven
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads