Re: need help about code mobility
Brian Pontarelli <[email protected]>
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <[email protected]> |
Which classloader is loading class A? If this is in the primordial classloader then this situation will not work. It has to be in the URLClassLoader or a child of that classloader in order to resolve its parent when it is loaded. -bp Mark Zaini wrote: > On Thu, 28 Dec 2006 10:18:50 -0600, Gregg Wonderly <[email protected]> > wrote: > >> Do you see apache serving up that class file in the access logs? Check >> > the > >> error logs if not to make sure that your class file is in the right place >> > given > >> its package and class name. i.e. if the package is the default package, >> > the > >> class file must be "C.class" in the directory that the /remoteclasses >> > alias > >> points to. If C is in the foo class, then C.class must be accessible as >> /remoteclasses/foo/C.class >> >> Gregg Wonderly >> > > > I have a exception with JVM I don't believe who I have problems > with Apache(because I made a test without inheritance between A and B ) > the exception is :java.lang.NoClassDefFoundError: class B > > (A extends B > B is remote) > > Class C{ > namecl="A"; > URLClassLoader ld = new URLClassLoader( new URL[] > { > new URL > ("http://myhost:80/remoteclasses/B.class")}) > Thread.currentThread().setContextClassLoader( ld ); > > Class resolved=Class.forName(namecl,true,ld); > ... > > I think that the problem is with the resolution of the hierarchy > What do you think? > Thank you very much for the explanations,Mark. > > -------------------------------------------------------------------------- > Getting Started: http://www.jini.org/wiki/Category:Getting_Started > Community Web Site: http://jini.org > jini-users Archive: http://archives.java.sun.com/archives/jini-users.html > Unsubscribing: email "signoff JINI-USERS" to [email protected] > -------------------------------------------------------------------------- Getting Started: http://www.jini.org/wiki/Category:Getting_Started Community Web Site: http://jini.org jini-users Archive: http://archives.java.sun.com/archives/jini-users.html Unsubscribing: email "signoff JINI-USERS" to [email protected]