IDE Tutorials CSE 219 Fall 2005 |
![]() |
TOC: AkA Tactical Operations Center |
![]() |
|||||||||||||||||||
|
|||||||||||||||||||||
This tutorial is to help students to setup and run a very basic java program using NetBeans. For more detailed information goto
http://www.netbeans.org/
![]() |
The Opening Screen |
![]() |
|
| When you first open netbeans you will be presented with this screen. If you want you can click the new project button to start a new project or proceed to the next slide to see another way to do it. | |||

![]() |
The File Menu |
![]() |
|
| The file menu presents you with a whole bunch of options. In our case we will be creating a new project, however if you already have an existing project all you need to do is click open project and navigate to it. | |||

![]() |
New Project Dialog |
![]() |
|
| This screen allows us to choose what kind of project we want to create. You can explore the different project types if you like but for our purposes we will be choosing a Java Application project from the General folder. Select the Java Application then click next. | |||

![]() |
New Project Dialog: Part II |
![]() |
|
| After you have clicked next you will see this screen. Type in the name of your project and then the project location if the default one is not sufficient. Since this is the only project in your solution you dont have to worry about the set as main project button, however to play it safe select it anyway. Also click create Main Class if you intend main to be in the source file that this will create. Then click finish to create the file. | |||

![]() |
Our new Surroundings |
![]() |
|
| After we have created the project the editor will pop up with our newly created project. On the left we see the files in the project and on the right is our editor for open files. Each file has a tab up top so you can switch between them. | |||

![]() |
Adding a Class: Our Friend Right Click |
![]() |
|
| One way and possibly the easiest way to add a class is to right click on the folder that you want the java file to be created in and then hover over new to bring up the menu and then click on Java Class. | |||

![]() |
Adding a Class Part II: Back to the File Menu |
![]() |
|
| Another way to add a new file which will give you more options is to goto the file menu and then click on new file. | |||

![]() |
New File Dialog |
![]() |
|
| This is the new file dialog, there are many different files that you can choose in here and in later tutorials we will explore some of these files however just for now click on Java Classes then Java Class. After this click next to proceed. | |||

![]() |
New File Dialog: Part II |
![]() |
|
| Now that we have clicked next we can change some specifics of our new file. In this window we can change the name of the class as it appears in the public class line of the file and also select the package and location to add it into our project. After this click finish to add it to the project. | |||

![]() |
A File is Born: |
![]() |
|
| Once again we are sent back to the main editor screen and you can see that we have our StrategoBoard file in the files list and the editor also opened it for us. | |||

![]() |
Lets Do Something |
![]() |
|
| Ok now that we know how to create a project and add files lets get the program to do something. For the sake of keeping this a simple project lets write a simple hello world program. | |||

![]() |
Time to Run |
![]() |
|
| Now that we have some code in place lets run the file. To do this we just goto the Run menu and then click Run Main Project. | |||

![]() |
The Result |
![]() |
|
| Now that we ran the program you will see a console section at the bottom of the page. This will be where your program outputs your print statements. | |||

![]() |
Questions Comments Complaints? |
![]() |
|
| If you have any questions or a way to make the tutorials better please speak with me or email me at dquigley at ic dot sunysb dot edu | |||