i saw this in java.policy file (under jre/lib/security) which i guess is the default policy file that is used when we run a java application on our machine. permission java.util.PropertyPermission "os.name", "read"; i was able to set the System property "os.name" to something else in my code. There was no runtime error either. probably setting the default security manager again is redundant? anyways this worked. When am allowed only a "read" action on the property why am i allowed to overwrite it? Can somebody explain this behaviour? thanks.
posted 13 years ago
Hi karthik, Well, if you have control of your own machine, doesn't it seem reasonable to let you grant what permissions you want? Those permissions in the system policy file are for "external" entites like an applet that came from some hacker's site. Hope this clears it up, Michael Morris
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher