🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.debugger
Article #5144

Re: Inner Class

#5144
From: Richard Wilkman
Date: Tue, 02 Feb 1999 00:00
91 lines
3758 bytes
JD:

Can you tell me what it's buying you to hide main?  Knowing the
history of inner classes and the forced use of them in Java, I still
haven't come up with any compelling reasons to use them (at least not
ones the weigh out against the need for others to maintain code).

It's one of those things that come up on a regular basis here (the
"why would I use inner classes", and so far the common answer is
"'cause I can" <g>).

-Rich

JD wrote:
> 
> Not digging for it, I can understand.  But not allowing me to specify it is
> another thing. Anyway, thanks for the response.  (And no, it's not just ego
> code ;-)
> 
> Richard Wilkman wrote:
> 
> > JD:
> >
> > JB has to find a runnable node in a piece of source code.  We look for
> > main() or init() as a top level node and use the first one we find as
> > the "runnable node".
> >
> > You really wouldn't want us to have to parse, entirely, all files in a
> > project just to find a hidden main()!  Well, the other 99% of the
> > world wouldn't like the wait <g>.
> >
> > That particuler tip from Bruce still doesn't strike me as beneficial
> > (and he didn't originate it, either) beyond being a piece of "ego
> > code"  ("Hey, look what *I* can do!"), but if it has some real world
> > gain for you, great!
> >
> > -Rich
> >
> > JD wrote:
> > >
> > > I'm having trouble debugging a main() inside an inner class.  Here's the
> > > code:
> > >
> > > public class TestInner{
> > >     public TestInner() { }
> > >
> > >     static public class Inner{
> > >         public static void main(String args[]){
> > >             System.out.println("some output");
> > >         }
> > >     }
> > > }
> > >
> > > It compiles fine, and runs from the command line (java TestInner$Inner)
> > > but I can't run/debug it from JBuilder.  I get a message: "Cannot
> > > determine runnable file".  I can't set TestInner$Inner to be the default
> > > runnable, even if I edit the jpr file by hand.  This works in J++.  Any
> > > ideas?
> > >
> > > P.S. If you're wondering why the hell I'd do this, check out Bruce
> > > Eckel's excellent book _Thinking_in_Java_.
> >
> > --
> >
> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > Rich Wilkman
> > Senior Quality Assurance Engineer
> > Borland JBuilder Team
> >
> > If you see something that looks like an opinion up there,
> > it's mine and mine alone.
> >
> > Mail sent to me from the newsgroups won't bounce but will
> > be ignored.  If I have time, I'll respond, but you  have
> > a better chance if you confine your posts to the newsgroups
> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-- 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rich Wilkman
Senior Quality Assurance Engineer
Borland JBuilder Team

If you see something that looks like an opinion up there,
it's mine and mine alone.

Mail sent to me from the newsgroups won't bounce but will
be ignored.  If I have time, I'll respond, but you  have
a better chance if you confine your posts to the newsgroups
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID: <36B7782B.515C83C4@inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <36B20481.D330D0CB@nh.ultranet.com> <36B5E04C.F18F69AD@inprise.com> <36B759CC.DDF75100@NOSPAM.nh.ultranet.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5c5,c1f13fcd437ce813
X-Google-Attributes: gidff5c5,public
From: Richard Wilkman <rwilkman@inprise.com>
Subject: Re: Inner Class
Date: 1999/02/02
Message-ID: <36B7782B.515C83C4@inprise.com>
X-Deja-AN: 439929998
Content-Transfer-Encoding: 7bit
References: <36B20481.D330D0CB@nh.ultranet.com> <36B5E04C.F18F69AD@inprise.com> <36B759CC.DDF75100@NOSPAM.nh.ultranet.com>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.debugger