🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15461

PROBLEMS WITH writeObject

#15461
From: MJR
Date: Mon, 14 Jun 1999 00:00
34 lines
2498 bytes
Can anyone tell me why the following simple applet produces a
com.ms.security.SecurityException...  every time it is brought up?


import java.awt.*;
import java.applet.*;
import java.io.*;

public class Test extends Applet {

    public void init() {
        try {
            FileOutputStream out = new FileOutputStream( "testing.dat" );
            ObjectOutputStream oos = new ObjectOutputStream( out );
            oos.writeObject( "testing" );
            oos.flush();
            oos.close();
            FileInputStream in = new FileInputStream( "testing.dat" );
            ObjectInputStream inStream = new ObjectInputStream( in );
            String t = (String) inStream.readObject();
            inStream.close();
            Panel p = new Panel();
            p.add( new Label( t ) );
            add( "Center", p );
            setSize( 400, 100 );
            setVisible( true );
         }
        catch (Exception e) {
            System.err.println(e);
            System.exit(1);
        }
    }

}
Technical Details
Message-ID: <7k3s2m$g7b$1@mailint03.im.hou.compaq.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5d71,4ad6f7ebbc681875,start
X-Google-Attributes: gidf5d71,public
X-Google-Thread: 113ae9,4ad6f7ebbc681875,start
X-Google-Attributes: gid113ae9,public
X-Google-Thread: f74b3,4ad6f7ebbc681875,start
X-Google-Attributes: gidf74b3,public
X-Google-Thread: 10a146,4ad6f7ebbc681875,start
X-Google-Attributes: gid10a146,public
X-Google-Thread: 111d6b,4ad6f7ebbc681875,start
X-Google-Attributes: gid111d6b,public
X-Google-Thread: 10bb9b,4ad6f7ebbc681875,start
X-Google-Attributes: gid10bb9b,public
X-Google-Thread: fecd1,4ad6f7ebbc681875,start
X-Google-Attributes: gidfecd1,public
X-Google-Thread: 115d3b,4ad6f7ebbc681875,start
X-Google-Attributes: gid115d3b,public
From: "MJR" <Rao.Mohith@compaq.com>
Subject: PROBLEMS WITH writeObject
Date: 1999/06/14
Message-ID: <7k3s2m$g7b$1@mailint03.im.hou.compaq.com>
X-Deja-AN: 489591057
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0
X-Complaints-To: usenet@mailint03.im.hou.compaq.com
X-Trace: mailint03.im.hou.compaq.com 929395606 16619 172.18.100.18 (14 Jun 1999 21:26:46 GMT)
Organization: Compaq Computer Corp.
NNTP-Posting-Date: 14 Jun 1999 21:26:46 GMT
Newsgroups: borland.public.jbuilder.java.language,comp.lang.java,comp.lang.java.api,comp.lang.java.help,comp.lang.java.machine,comp.lang.java.misc,comp.lang.java.programmer,comp.lang.java.security,microsoft.public.inetexplorer.ie4.java_applets,microsoft.publ