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)
---------------------------------------------------------