File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes Access Rights Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "Access Rights" Watch "Access Rights" New topic
Author

Access Rights

Shilpa Sharma
Greenhorn

Joined: Mar 12, 2001
Posts: 3
Can an applet "test" the system to determine its access rights? Why or Why not.
------------------
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

what type of test do you have in mind?
I did some test on system read/wirte permissions.
Chk out this posting.....
regds.
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Shilpa Sharma
Greenhorn

Joined: Mar 12, 2001
Posts: 3
Thanks for your reply Satya.
Can u please tell me which of the below mentioned answers are correct.
Can an applet "test" the system to determine its access rights why or why not?
1. no, the information is in the System object, which is restricted from applets
2. yes, by querying its ClassLoader object
3. no, applets can not query the SecurityManager directly
4. no, the applet is automatically terminated when it tries to access restricted resources
5. yes by attempting various operations and catching SecurityExceptions
Regards,
Shilpa
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

Hopefully, you don't expect me to give you a straight
forward answer, do you! Well, sorry to disappoint you,
but I am not an Applet guru, trying to be......
I can suggest this FAQ with examples, for further reading, I do it but,
as needed only! This FAQ is about Applet Security.
HTH. regds.
- satya
 
 
subject: Access Rights
 
Threads others viewed
Doubt in protected access
The system can only find one of the two files specified
Java code do not execute
Read application-policy / content of login-config.xml at runtime
Unable To Write Image on Web Host Directory
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com