1 / 11

Netbeans QuickStart

Netbeans QuickStart. Creating a project. File->New Project For now you want General->Java Application Then fill in the project details. Creating a project. Netbeans allows You to have multiple project open at once. The main project is the one that toolbar operations will affect.

noonkester
Télécharger la présentation

Netbeans QuickStart

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Netbeans QuickStart

  2. Creating a project • File->New Project • For now you want General->Java Application • Then fill in the project details

  3. Creating a project Netbeans allows You to have multiple project open at once. The main project is the one that toolbar operations will affect. When you choose “Run project” Netbeans will run the Main Class it created during this step

  4. Editing Files When you choose “Run project” Netbeans will run the Main Class it created during this step The projects pane shows your source files under “Source Packages”. (You can also see these in the “Files” pane. Double click a file to edit Right-click on “Source Pacakges” to add a new file

  5. Running your program Click to run your program (or use the Run menu to run your program.) When you choose “Run project” Netbeans will run the Main Class it created during this step

  6. Debugging Clicking here will set a “breakpoint” Breakpoints cause your code to halt at a specific point for you to examine variables, the stack, etc… and step line By line through the code.

  7. Debugging • Once you set a breakpoint you can debug your program by running the code in debug mode.

  8. Debugging Tools • Once you set a breakpoint you can debug your program by running the code in debug mode. Keep running to next breakpoint Step to the next line in this file (call a method and return) Step out of this method to the caller Step into the method call on this line View the stack Check the value of an expression (using variables from your program) Add a variable to watch window (not shown in this slide, but will be shown when you run the debugger)

  9. Submitting Code • In order to grade your code, you’ll be submitting a Jar (Java Archive) file with your compiled classes. • A Jar file is a compressed file (like a Zip file) to package multiple files together. • You can configure Netbeans to create the Jar file for you.

  10. Adding source to a Netbeans Jar • In Netbeans to include your source code: • Right click on your project name (in the projects window) • Select properties • Select Build->Packaging • Remove everything in the "Exclude from Jar" texfield. • Click ok. • When you build the software the Jar file created in <<project name>>/dist/<<project name>>.jar will include the source and compiled Java classes. This is the file to turn in.

  11. Other Notes • The “windows” menu has many other optional windows you can open. • Right-clicking on a keyword/method/variable name will give you options to see where it is used or any documentation about it • There are many other things you can do with Netbeans. See the tutorials on the class website or just view the help in Netbeans!

More Related