Hi Simeon I think you can create a new project and choose 'Java Project with Existing Sources'. That may or may not create a package statement when the .java file is opened, I haven't done it for a while. Otherwise, I think you do need the package statement so that NetBeans knows what directory the project is in.
Regards Chris On Jan 3, 9:07 pm, Simeon Seguin <[email protected]> wrote: > Hi guys > I have a problem with running programs with netbean. > I was unable to run in the command prompt either till I found that I must > enter > "set Classpath = " before I compile the program. > > Now I am unable to run a program in Netbeans unless I create a package > statement > the project name would be: > > "MyAverageNumberProject" > > Creat main class I would put: > "MyAverageNumberProject" > > This won't work it says that it is unable to find class deffinition. > > However if I put in Create Main Class: > "myaveragenumberproject.MyAverageNumberProject" > > It will compile and run properly. > It creates a package and without it it will not run. Is this how everyone > else is doing it? Or is their another method for writing, running, and > compiling code without makeing a package. Thanks > > Simeon > > __________________________________________________________________ > Make your browsing faster, safer, and easier with the new Internet Explorer® > 8. Optimized for Yahoo! Get it Now for Free! > athttp://downloads.yahoo.com/ca/internetexplorer/ -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en
