HENRY LO
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
h...@parsonsinfosys.com wrote:
> Hello,
> I've a question. I don't know how to JAR a program with RMI techique.
> All my classes are in a package MyLib (include all stubs and skels). I
> only want to JAR the classes that Client side needed. But some of the class
> that RMI class need and client side applet also needed. So do I need to
> separate the classes into RMI classes and client classes? i already try to
> JAR the client classes and leave the RMI classes without JAR, but I got RMI
> lookup error. So how can I Jar those classes? Thanks in advance!!
I finally gave up trying to separate out my classes. It is silly, but my applet
(which is my RMI client, of course) downloads the entire server along with the
client.
I figure I will eventually find a way to pick out a few of these classes, but
the issue seems to be that the class loader validates all references within the
class at the time that it is loaded. If a class seems to refer to another
class, even from within a method that the client never uses, it wants that
class. So I have to have a lot of stuff that I don't use.
I believe, ultimately, the solution will be to have two versions of some of my
classes, one of them a class-light, that satisfies the references but doesn't
really do anything. This seems like a drawback in RMI to me, but, oh well.
Ed Smith