🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Loading classes / casting problem

#14753
From: Ben Starr
Date: Fri, 06 Aug 1999 00:00
19 lines
1442 bytes
Two things:

1. You have specified the implementation as being called MyCommand but when
you load it you are loading myCommand (lowercase m). Don't know if this is
just a typo? You would also have to have another class myCommand if the load
worked.

2. You haven't specified where you create an instance of the the class. You
need to have Befehl b = (Befehl)myClass.newInstance(). If you try and cast
myClass to Befehl it will fail because the Class Object doesn't implement
this interface, only the instance (of type MyCommand) does. Again, don't
know if you just forgot to include this in the e-mail.

Hope this helps,

Ben Starr
BenS@compurp.org.uk
(Please note my e-mail address has been altered to avoid spammers,
change compurp to commonpurpose if you wish to e-mail me)
Technical Details
Message-ID: <933930076.11774.0.nnrp-04.c3add604@news.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7ocqkj$rm717@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,52cfadaf87143629
X-Google-Attributes: gidf74b3,public
From: "Ben Starr" <BenS@compurp.org.uk>
Subject: Re: Loading classes / casting problem
Date: 1999/08/06
Message-ID: <933930076.11774.0.nnrp-04.c3add604@news.demon.co.uk>
X-Deja-AN: 509518435
X-NNTP-Posting-Host: [195.173.214.4]:195.173.214.4
References: <7ocqkj$rm717@forums.borland.com>
X-Trace: news.demon.co.uk 933930076 nnrp-04:11774 NO-IDENT [195.173.214.4]:195.173.214.4
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Newsgroups: borland.public.jbuilder.java.language
X-Complaints-To: abuse@demon.net