# sockets

DeYoe, David (David.DeYoe@GSC.GTE.Com)
Thu, 15 May 1997 12:42:45 -0400

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Vasco Moises Alves Duarte: "Security out of United States Bounds"
- Previous message: Marianne Mueller: "Re: Running applets within Netscape 3.0 or Netscape communicator"

    Date: Thu, 15 May 1997 12:42:45 -0400

    From: "DeYoe, David" <David.DeYoe@GSC.GTE.Com>

    Subject: sockets

    To: "'java-security@java.sun.com'" <java-security@web2.javasoft.com>

This is my situation:
I'm trying to create a basic client/server app. At the moment, I am
running a java application that basically waits for incoming connection
requests. I'm positive the problem isn't here.
On the same machine, the "client" is attempting a request to open a
connection with the following lines:

Socket mySocket = null;
public final static int PORT = 4130;
// more code
try {
mySocket = new Socket("localhost", PORT);
} catch ...

I have the "catch" printStackTrace for the exception and get the
following exception:

java.lang.ClassCastException: vrml.VrmlClassLoader
java.lang.ClassCastException: vrml.VrmlClassLoader
at netscape.applet.AppletSecurity.checkConnect(Compiled Code)
at java.net.InetAddress.getAllByName(Compiled Code)
at java.net.InetAddress.getByName(Compiled Code)
at java.net.Socket.<init>(Compiled Code)
at java.net.Socket.<init>(Compiled Code)
at client.initialize(Compiled Code)

What do I need to do to get this code to work? I am assuming it is an
artifact of netscape's security configuration, but everything I read
tells me that Netscape Navigator 3.x loading applets over the local file
system should have these capabilities. I am using Netscape 3.0, jdk
1.0.2, and am calling the code from CosmoPlayer (VRML).

Thanks, in advance.

David DeYoe

- Next message: Vasco Moises Alves Duarte: "Security out of United States Bounds"
- Previous message: Marianne Mueller: "Re: Running applets within Netscape 3.0 or Netscape communicator"