[782] in java-interest
Firewall and ClassLoader
daemon@ATHENA.MIT.EDU (Mattias Mattsson)
Thu Jul 20 00:56:14 1995
To: java-interest@java.Eng.Sun.COM
Date: Wed, 19 Jul 1995 16:17:11 +0200
From: Mattias Mattsson <mattias@cdt.luth.se>
Hi,
We are two students that are working with a project which involves Java.
We have come across a problem while making an application. This application
uses a classloader which we have written ourselves. The classes that
are loaded should have a certain, restricted access to the classes in the
net package. The problem is; when we try to make a socket connection in
a class loaded by our classloader, the socket constructor makes a call
to the Firewall.verifyAccess() method. This method refuses an access if the
classloader is different from WWWClassLoader, thus the socket connection
always fails. Both WWWClassLoader and Firewall are final so we can't extend
them.
Is there a solution to this problem that we haven't noticed or do we have
to hack the Firewall code?
In the verifyAccess method this comment exists:
// don't know what to do about other class loaders right now
which seems to imply that there will be possibilities to use other
classloaders together with socket connections in the future. Is this the
case?
Per Danvind and Mattias Mattsson
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com