× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



A single JVM can have two classes within the same package if the classes are
loaded by different classloaders. This gets a little bit complicated
because some classloaders don't allow this in the sense that they delegate
the search for the class or resource to its parent class loader before
attempting to find the class or resource itself. In that case, of course,
the classloader will find the class from the parent class loader and
therefore won't attempt to load the class itself. However, for
non-delegating classloaders multiple classloaders can definitely load two
classes with the same package.

Gary

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Joe Pluta
Sent: Saturday, March 07, 2009 10:22 AM
To: Java Programming on and around the iSeries / AS400
Subject: Re: Third party library locations

David Gibbs wrote:
I'm not 100% sure about this ... but isn't there a way to configure (or
write) a class loader so that you can isolate classes?

I seem to recall that Eclipse's plug-in mechanism has some ability to
keep jar's that are included in one plug-in from conflicting with the
jar's of another plug-in.

And this is exactly where my heads begins to throb and my eye bulge.
From a purely common sense point of view, I find it difficult to think
that a single JVM can have two classes with the same package and
signature. Can't be done, I don't think (how would you know which was
which?). So the trick is to have multiple JVMs, but obviously those two
JVMs can't then share objects between them (unless they use some sort of
RMI technique).

Class versioning makes me a little bit crazy...

Joe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.