🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #14689

Re: Loading classes / casting problem (THE WORKAROUND)

#14689
From: Alex
Date: Fri, 13 Aug 1999 00:00
17 lines
1194 bytes
Hi everybody,


I posted my question because I want to load classes and use them just like
the ones loaded by the virtual machine.

I extended ClassLoader and used my new class to load *.class files from the
local file system. (Loading classes worked fine but I couldn�t cast them to
an interface the implement).


Then I found out that Class.forName (String className) loads class files for
me. These classes (loaded using Class.forName ("package.class"); ) can be
instanciated and casted to any interface they implement.

That�s it.
Alex.
Technical Details
Message-ID: <7p1o0s$i5316@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7ocqkj$rm717@forums.borland.com> <37AACC80.85E24B37@c-content.nl> <7oi92f$38f3@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f74b3,52cfadaf87143629
X-Google-Attributes: gidf74b3,public
From: "Alex" <alexbged@linux.zrz.tu-berlin.de>
Subject: Re: Loading classes / casting problem  (THE WORKAROUND)
Date: 1999/08/13
Message-ID: <7p1o0s$i5316@forums.borland.com>
X-Deja-AN: 512350860
References: <7ocqkj$rm717@forums.borland.com> <37AACC80.85E24B37@c-content.nl> <7oi92f$38f3@forums.borland.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.language