× 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.



Joe,

if you need to write a custom classloader, there are some articles on the
IBM developerworks site that discuss this(assuming you havent done this
before!).

I recently knocked up a custom classloader so that i could setup my
classpath dynamically, rather than setting using the RUNJVA command.

I had an application that used a component dependent on a lot of open source
JARS, and I didnt want to type them all in to the classpath one by one.
So I created custom classloader that I could point at a directory, and it
would add all the jars to the classpath.

cheers
Colin.W

----- Original Message ----- 
From: <furgalj@xxxxxxxxxxxxxxxx>
To: <java400-l@xxxxxxxxxxxx>
Cc: <java400-l@xxxxxxxxxxxx>; <java400-l-bounces@xxxxxxxxxxxx>
Sent: Monday, August 30, 2004 3:36 PM
Subject: Re: Declaring Java classes and methods


> Joe Pluta wrote:
>
> >I'm a little unclear as to how tightly typed the type O variables are.
> >If I declare a type O variable as class Widget, must I instatiate an
> >object of type Widget to stick in there?  Can I use a subclass of
> >Widget?  Can I use a class that's NOT a subclass, provided the method I
> >later invoke has the same signature?
> >
> >I can do this with a factory method.  I'd have to instatiate the
> >factory, and then pass the class name into the factory as a parameter to
> >instantiate the actual object (or have a delegate method in the factory
> >that emulates the desired method, only taking a class name as well).  It
> >would be a little easier if I could do it in the RPG, is all.
>
> Joe, maybe I'm stating the obvious here, and you've already looked into
> this, but if not, it might be worth a try. I believe what you need is a
> custom class loader. You can write them yourself if you study how Java
> does it. This could be a static class and loader method, so that when you
> called it with the class.method variable name it would not have to be
> instantiated each time. You might even be able to do some of this in RPG,
> but I'm not at all sure about that. But I have seen and heard of people
> writing stranger class loaders than that -)! Also, as to your last point,
> can't you define interfaces for the classes and methods you're interested
> in ant invoke them via the interface method? By doing this you should be
> able to slip in almost anything as long as the signature matches.
>
>
> _________________________________________________________________
> Jeff Furgal / MIMIX User Interface Product Architect / Lakeview Technology
>
> furgalj@xxxxxxxxxxxxxxxx / 630-282-8360
>
> LAKEVIEW TECHNOLOGY CONFIDENTIAL
>
> This e-mail may contain SECRET, PRIVILEGED AND/OR CONFIDENTIAL INFORMATION
> intended only for the use of the addressee.  If you are not the addressee,
> or the person responsible for delivering it to the person addressed, you
> may not copy or deliver this to anyone else.  If you received this e-mail
> in error, please immediately notify Lakeview by returning the original
> message to the sender via e-mail.
> --
> This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
> To post a message email: JAVA400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/java400-l.
>
>


This e-mail has been sent by a company of Bertram Group Ltd, whose registered 
office is 1 Broadland Business Park, Norwich, NR7 0WF. 
This message, and any attachments, are intended solely for the addressee and 
may contain privileged or confidential information.  If you are not the 
intended recipient, any disclosure, copying, distribution or any action taken 
or omitted to be taken in reliance on it, is prohibited and may be unlawful.  
If you believe that you have received this email in error, please contact the 
sender immediately. Opinions, conclusions and statements of intent in this 
e-mail are those of the sender and will not bind a Bertram Group Ltd company 
unless confirmed in writing by a director independently of this message. 
Although we have taken steps to ensure that this email and any attachments are 
free from any virus, we advise that in keeping with good computing practice the 
recipient should ensure they are actually virus free.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.