• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

java.security.AccessControlException

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi,
I get a security exception when I redefine line seperator. This code has to run on Netscape 4.7. Can any body
help me out? I'll be greatful.
Regards,
Harsha

public void init()
{
///////////////// Redefine line seperator here ///////////////////
Properties sysProp = System.getProperties();
String lineprop = sysProp.getProperty("line.separator");
sysProp.put("line.separator","\n");
System.setProperties(sysProp);
///////////////// End redefining line seperator //////////////////
setLayout(new BorderLayout());
text = new TextArea(7,35);
add("North", text);
add("South", new Label("To be run on Netscape 4.7"));
Font newFont = new Font("serif",Font.PLAIN,26);
text.setFont(newFont);
resize(350, 300);
text.requestFocus();
}
Netscape displays this message on the status bar....
Applet <APPLET NAME> can't start: ERROR
The exception thrown is captured by Netscape's Java console which is as follows....
---------------------------------------------------------
netscape.security.AppletSecurityException: security.checkpropsaccess
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at netscape.security.AppletSecurityException.<init>(Compiled Code)
at netscape.security.AppletSecurityException.<init>(Compiled Code)
at netscape.security.AppletSecurity.checkPropertiesAccess(Compiled Code)
at java.lang.SecurityManager.checkPropertiesAccess(Compiled Code)
at java.lang.System.getProperties(Compiled Code)
at kannada_av.init(Compiled Code)
* at netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled Code)
at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)
at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
---------------------------------------------------------
 
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic