🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2395

Re: Newby Question

#2395
From: Joi Ellis
Date: Mon, 23 Oct 2000 00:00
51 lines
2648 bytes
James A. Schulz <jaschulz@wiseware.com> wrote:
> Joi,

> The Main function has the required form.  The error I get when I try to run
> the project is:

>     Could not find the main class.  Program will exit.

> Presumably this is something about the myriad of different folders required
> for a project.

> So, let me frame my question again:

>     1.  I have a file  ThisExample.java.  It lives in a folder called JAVA
> STUFF.

>     2.  I start JB4 and do File|New Project.  I name my project test and
> accept all of the defaults.  This creates a folder
> c:\windows\jbproject\test and puts two files (test.html and test.ppx) into
> that folder.  I now do Project|Add Files/Packages and navigate to my JAVA
> STUFF folder and choose ThisExample.java.  The IDE is updated with
> ThisExample.java and its various functions.  

I think this is the problem.  JBuilder expects java source files to be 
located on the project's source path.  By default this source path includes
only the jbproject\test\src directory JBuilder created.

You need to do one of the following, whichever works:

A) Move the file from "JAVA STUFF" down into jbproject\test\src, then 
build the project.  Now you should be able to select it from the class
browser when you set the main class.

B) Add the "JAVA STUFF" directory to the project's properties/paths/sources
tab.

(I know A will work, I think B will but I haven't tried it.)

Lastly, be aware that Java doesn't handle filenames with spaces in them.
That "JAVA STUFF" folder, with its embedded space, could cause you
additional problems.  This is a Java issue, not a JBuilder issue.


-- 
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: <8t26tt$2gi1@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8stob4$hjb1@bornews.borland.com> <39f2ec4b_1@dnews> <8t1b28$mbv10@bornews.borland.com> <8t1pcu$qop5@bornews.borland.com> <8t1rq2$qp97@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: <8t26tt$2gi1@bornews.borland.com>
X-Deja-AN: 684958773
References: <8stob4$hjb1@bornews.borland.com> <39f2ec4b_1@dnews> <8t1b28$mbv10@bornews.borland.com> <8t1pcu$qop5@bornews.borland.com> <8t1rq2$qp97@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