Article View: borland.public.jbuilder.java.api
Article #2396Re: Newby Question
From: James A. Schulz
Date: Mon, 23 Oct 2000 00:00
Date: Mon, 23 Oct 2000 00:00
85 lines
4126 bytes
4126 bytes
Joi, No,that's not it. Let me explain exactly what I did. The source is UnicodeDisplay.java (from the O'Reilly Jave Examples book). It starts out in my JAVA STUFF folder. I open JB4, and choose File|New Project. I name the project "unicode.jpx" and accept the other defaults. This creates c:\windows\jbproject\unicode (but it does not create either the src or classes or bak). I "manually" create c:\windows\jbproject\unicode\src and copy UnicodeDisplay.java in to it. Then in the IDE, I choose Project|Add Files/Packages, navigate to c:\windows\jbproject\unicode\src and double-click UnicodeDisplay.java. I then go to Project|Properties, choose the Run tab, and then press the elipsis button on the Application tab. The dialog appears with "UnicodeDisplay" in the drop-down, and in the list, UnicodeDisplay apprears at the very bottom. I double-click the "UnicodeDisplay" item in the list to select it as my "Main Class" and then I click the OK button to close the dialog. Now I run the project and, yet one more time, I get the "Could not find the main class. Program will exit." error message. What am I doing wrong here? thanks, James "Joi Ellis" <joi@joi.aravox.com> wrote in message news:8t26tt$2gi1@bornews.borland.com... > 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:
<8t2ur5$8k61@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> <8t1pcu$qop5@bornews.borland.com> <8t1rq2$qp97@bornews.borland.com> <8t26tt$2gi1@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: "James A. Schulz" <jaschulz@wiseware.com> Subject: Re: Newby Question Date: 2000/10/23 Message-ID: <8t2ur5$8k61@bornews.borland.com> X-Deja-AN: 685084349 References: <8stob4$hjb1@bornews.borland.com> <39f2ec4b_1@dnews> <8t1b28$mbv10@bornews.borland.com> <8t1pcu$qop5@bornews.borland.com> <8t1rq2$qp97@bornews.borland.com> <8t26tt$2gi1@bornews.borland.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Reply-To: "James A. Schulz" <jaschulz@wiseware.com> Newsgroups: borland.public.jbuilder.java.api