11
The NetBeans IDE CSIS 3701: Advanced Object Oriented Programming

The NetBeans IDE

  • Upload
    yori

  • View
    43

  • Download
    2

Embed Size (px)

DESCRIPTION

The NetBeans IDE. CSIS 3701: Advanced Object Oriented Programming. Integrated Development Environment. Single environment with tools for: Generating and editing source code Compiling and executing code Testing and debugging code NetBeans IDE for Java - PowerPoint PPT Presentation

Citation preview

Page 1: The NetBeans IDE

The NetBeans IDE

CSIS 3701: Advanced Object Oriented Programming

Page 2: The NetBeans IDE

Integrated Development Environment

• Single environment with tools for:– Generating and editing source code– Compiling and executing code– Testing and debugging code

• NetBeans IDE for Java– Available with Java from Sun (http://java.sun.com )– Available separately from http://www.netbeans.org – See “Homework 0” on course web site for more

details

Page 3: The NetBeans IDE

NetBeans Organization

• Applications organized into projects– Contains all files associated with application

(source code, executables, testing, etc.)

• Projects contain packages– Groups of related files (like C++ libraries)

• Packages contain individual files– Each class in own file– Class is application if contains a main function

(can be executed in standalone mode)

Page 4: The NetBeans IDE

Creating Projects

• Select File New Project

Page 5: The NetBeans IDE

Creating Projects

• Choose Java as category and then Java Application

Page 6: The NetBeans IDE

Creating Projects

• Give basic information about project– Project name– Where stored on computer

Automatically creates a “main” class with same name as project

Page 7: The NetBeans IDE

Basic Project Structure

• Project listed on left

• Contains packages for that project

By default package with same name as project automatically created under Source Packages

• Package contains main class defined when project created

• Will see other packages besides source packages later (testing, etc.)

Page 8: The NetBeans IDE

Editing a Class

• Source code written and edited in IDE• Color coded by type:

– Keywords blue– Identifiers green– Strings orange– Comments grey

Page 9: The NetBeans IDE

Editing a Class

• Automatically checks syntax of class after every change• Syntax errors highlighted in red• Hints available on rollover

Page 10: The NetBeans IDE

Compiling and Running a Project

• Can compile (“build”) and run from Run menu– Running automatically saves and compiles project

– Can use shortcut

Page 11: The NetBeans IDE

Running a Project

• Code executed starting in main method of the main class• GUI output popped up in

separate window

• Text written to standard output displayed in “Output” tab on bottom of NetBeans window