I have never actually done this, by the RMIClassLoader should permit the dynamic
loading of classes.  Below is my summary of the description provided by Java
Enterprise in a Nutshell.

Cynthia Jeness
---------------------------------------------

Dynamically Loaded Classes

      Loading classes may involve 3 different class loaders:

            Default ClassLoader - Classes from your CLASSPATH which do not get
loaded as a result of naming look-ups.

            Applet ClassLoader - Loading classes over the web for applets.

            RMI ClassLoader - Loads from your local CLASSPATH if available;
otherwise, may load from a specified URL which is
            identified as part of starting the process:


               java -Djava.rmi.server.codebase=http://pup/~cj/JavaCert/
samples.rmiRegAccount


      Your program must install a Security Manager which supports remote loading:


         System.setSecurityManager(new RMISecurityManager());


      Default Java security policy does not permit this, so the following line must
be added:

         permission java.net.SocketPermission "objhost.org", "accept,connect"

         where "objhost.org" is the name for your remote host.


      Then use the following when actually running the application:

         java -Djava.security.policy=rmipolicy.txt samples.rmi.AccountClient



Nathan Meyers wrote:

> On Tue, Jan 11, 2000 at 01:15:17PM -0500, Aaron Stromas wrote:
> > it also worked on linux when i copied the _Stub class to the client. so,
> > why doesn't the server find the stub to return to the client?
>
> Ah, the real meat of the question. Answer: because RMI doesn't work that
> way.
>
> RMI doesn't send classfiles, either for the real class or the stub.
> The client has to be able to find the stub in its own classpath.
> RMI just sends data that is used with the stub class.
>
> Nathan Meyers
> [EMAIL PROTECTED]
>
> > > Aaron Stromas wrote:
> > >
> > > > [EMAIL PROTECTED] wrote:
> > > >
> > > > > On Tue, Jan 11, 2000 at 02:00:00PM +0000, Aaron M. Stromas wrote:
> > > > > > greetings,
> > > > > >
> > > > > > may someone have a hint as to what my problem may be and how to fix it.
> > > > > > here is what is happening. i have a an rmi application with linux
> > > > > > client  (jdk 1.2) and solaris server (jdk 1.3). the client throws an
> > > > > > UnmarshalException. i could not figure out why it wa happening, so i
> > > > > > tried the rmi example from the  "professional java server programming"
> > > > > > which also throws the unmarshal exception. the client ran fine on the
> > > > > > same solaris box where the server ran, so i tried the client from
> > > > > > another solaris host, also running jdk 1.3 - runs fine.
> > > > >
> > > > > Don't the two vm's have to be the same, as the serial numbers will be
> > > > > different between 1.2 and 1.3, which will cause Serialization errors?
> > > > >
> > > >
> > > > i did not know that. is that a fact? if so, i have a serious problem :-(
> > >
> > > that does not appear to be so, at least, not on solaris - i installed
> > > jdk1.2.1_04 and the client ran ok.
> > >
> >
> > it also worked on linux when i copied the _Stub class to the client. so,
> > why doesn't the server find the stub to return to the client?
> > --
> > Aaron Stromas
> > Oracle Corp.
> >
> > "Tick-tick-tick!!!... ja, Pantani is weg...."
> >                   (BRTN commentator, L'Alpe d'Huez, 1995 Tour de France)
> >
> >
>
> Content-Description: Card for Aaron Stromas
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to