1 Replies - 1792 Views - Last Post: 18 December 2005 - 06:04 PM Rate Topic: -----

#1 chobo2  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 19-November 05

Need Help Using NetBeans.

Posted 18 December 2005 - 02:49 PM

Hi I am trying to use Netbeans but I am having a lot of trouble using it. I have a couple problems first I don't really understand why I have to make a new project everytime before I can make a file. Like I don't understand when I am making a new project folder thing if I suppost to check Set as Main Project & Create Main class. I usally uncheck those but I am not sure I am suppost to.

2nd I have existing code from a while back and I can't get them to run in netbeans and I am not sure why not. Like the file opens up in netbeans(file Open file) but when I go to go run-run file it is all grayed out.

In order for me to get it to work I got to do this:

Step 1: Make a new project
Step 2: Uncheck set as main project & main class
Step 3: File new File --- Empty Java File
Step 4: Name the Class
Step 5: Copy in paste all my old code into new file

and it works but I am sure that is not the only way to do it since that would be so dumb.

So I don't know where to start on using this program like I just want to know the basics of opening files,projects, and stuff and learn the rest on the way.

I been doing java for a little while but still not very good at it but I want to learn NetBeans and slowly get good at it so right now I just need to know the basics and once I get to more advancded stuff in java I will explore Netbeans more.

Is This A Good Question/Topic? 0
  • +

Replies To: Need Help Using NetBeans.

#2 1lacca  Icon User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

Re: Need Help Using NetBeans.

Posted 18 December 2005 - 06:04 PM

Because you are new to Netbeans I suppose you have just downloaded it and so you are dealing with one of the the recent installments in the 4.x series.
Projects might look frightening, but I think all IDEs will force them onto you (some even have solutions :P ), as they are a good way for organizing your work if created correctly.
The main project is started if you select run main project from the run menu.
If you run a project, the class selected as the main class will start. Again, in the beginning this seems to be overkill, and cumbersome, but later you might deal with systems where you need several projects, and each of them have multiple entrypoints. So at the moment, just select your current project as the main project, and its main class as the main class - yay...
Importing existing code:
File ->New project -> Select: General Category and Project with existing source code (and press next)-> there set a project directory and a descriptive name (press next) -> Add the folder of your existing application to the _Source package fodlers_ and press Finish.
You might get warnings if you already have a project that uses that directory (you have already added it to another project), or if you have compiled classes there (delete them, or the IDE might do that for you, too).
I hope this helps.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1