Article View: borland.public.jbuilder.java.api
Article #2393Re: Newby Question
From: Joi Ellis
Date: Mon, 23 Oct 2000 00:00
Date: Mon, 23 Oct 2000 00:00
40 lines
2217 bytes
2217 bytes
James A. Schulz <jaschulz@wiseware.com> wrote:
> Michael,
> OK. I did all that...up to the point of choosing my main class. In the
> drop down all I see is the name of the source file, i.e. ThisExample.java.
> I cannot expand that item. If I choose ThisExample.java as my Main class, I
> get a "cannot find main class" error when I run the project. The source
> (ThisExample.jave) does include a Main function but I don't understand how I
> am supposed to point JBuilder to that function.
> Any suggestions would be appreciated.
You only have to point at the class which contains the main() method.
You aren't expected to point at the method itself.
Question: You state above that you're pointing at ThisExample.java.
Is that what shows up in the class browser? Or is it just ThisExample?
If there really is a .java showing up in the class browser, something
is wrong with the project somewhere.
Note that java is very particular about the signature of the main method.
It must look like:
public static void main(String[] args) {
blah...
}
The only leeway you have is in the name of the array, args. You can
change the name, but you can't change anything else. If you change
anything else, java won't execute the application properly, if at all.
--
Joi Ellis Software Engineer
Aravox Technologies joi@aravox.com, gyles19@visi.com
No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried. Anything
that kicks a monopoly in the pants has got to be good for something.
- Chris Johnson
Technical Details
Message-ID:
<8t1pcu$qop5@bornews.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8stob4$hjb1@bornews.borland.com> <39f2ec4b_1@dnews> <8t1b28$mbv10@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,66c65841f86ddcb1
X-Google-Attributes: gid1089d0,public
From: Joi Ellis <joi@joi.aravox.com>
Subject: Re: Newby Question
Date: 2000/10/23
Message-ID: <8t1pcu$qop5@bornews.borland.com>
X-Deja-AN: 684872877
References: <8stob4$hjb1@bornews.borland.com> <39f2ec4b_1@dnews> <8t1b28$mbv10@bornews.borland.com>
Organization: Another Netscape Collabra Server User
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.14-5.0 (i686))
Newsgroups: borland.public.jbuilder.java.api