java permissions

User avatar
nperm
Уже с Приветом
Posts: 108
Joined: 10 Oct 1999 09:01
Location: Staten Island, NY

java permissions

Post by nperm »

Does anyone know the reason why first one is working and second one is not? (applet starts a program on a client machine)

1. permission java.io.FilePermission "<<ALL FILES>>","execute";

2. permission java.io.FilePermission "c:\\-", "execute";

thank you.
User avatar
Дед Мороз
Уже с Приветом
Posts: 4412
Joined: 06 Nov 2003 17:03
Location: TX

Post by Дед Мороз »

I guess that :
The first one matches any/all file(s) in current directory
The second - any/all file(s) on the disk
User avatar
nperm
Уже с Приветом
Posts: 108
Joined: 10 Oct 1999 09:01
Location: Staten Island, NY

Post by nperm »

I don't think it is correct because, first, current directory is "." . Second, that I am trying to start a program from an applet and that program is on c: but not in any current directory. I just wanted to narrow <All Files> to a particular .exe but for whatever reason #1 works but #2 does not.

Any ideas are welcome.
thanks
SiarheiH
Уже с Приветом
Posts: 297
Joined: 21 Mar 2002 10:01
Location: Minsk, BY -> central NJ

Post by SiarheiH »

Я думаю, что
1. это все файлы и не только в текущей директории.
2. здесь надо обратить внимание на использование слэшей и бэкслэшей и скорее всего задовать маску (например "C:/dirA/*").

Return to “Вопросы и новости IT”