🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Security problem

#16267
From: Stefan Roeck
Date: Sun, 14 Mar 1999 00:00
29 lines
1327 bytes
I have problems with security in my applet, which should send data between
two PC in a local network. I have tried something like this:

  Socket server = new Socket("101.0.0.1",1234);
  OutputStream out = server.getOutputStream();
  out.write(13);

  server.close();

and this in the server application:

  ServerSocket listener = new ServerSocket(1234);
  while (true){
    Socket aClient = listener.accept();
    InputStream in = aClient.getInputStream();

    int zahl = in.read();
  }

The problem is the SecurityManager which seems to refuse to open a socket
(he does not if I start my Applet from an IDE, as J++) and a
SecurityException occurs.

What is the easiest way to manage this. I have read about signing applets,
creating keys, etc. in documents from sun.com, but it looks quite difficult
and nothing really works (it seems so!).

Thanks,
Stefan, cerasus@gmx.de
Technical Details
Message-ID: <7cgo6t$sco12@forums.borland.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: f74b3,2a665370f03f869f,start
X-Google-Attributes: gidf74b3,public
From: "Stefan Roeck" <cerasus@gmx.de>
Subject: Security problem
Date: 1999/03/14
Message-ID: <7cgo6t$sco12@forums.borland.com>
X-Deja-AN: 454890931
Organization: cerasus.development
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Newsgroups: borland.public.jbuilder.java.language