Java Integrated Development Environments IDEs - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Java Integrated Development Environments IDEs

Description:

IntelliJ IDEA may be the best and the non-profit license version costs only $100 ... They email you a license key for personal use. Sun's NetBeans. Eclipse ... – PowerPoint PPT presentation

Number of Views:138
Avg rating:3.0/5.0
Slides: 17
Provided by: cexpem
Category:

less

Transcript and Presenter's Notes

Title: Java Integrated Development Environments IDEs


1
Java Integrated Development Environments (IDEs)
  • Written by Jeff Smith

2
IDEs -1
  • There are numerous good IDEs for Java
    development, many of them free
  • IntelliJ IDEA may be the best and the non-profit
    license version costs only 100
  • Here are three leading (free) IDEs
  • Borlands JBuilder is (sort of) freeJBuilder
    2006 Enterprise becomes JBuilder Foundation in 30
    days. They email you a license key for personal
    use.
  • Suns NetBeans
  • Eclipse
  • JBuilder and NetBeans include GUI builder, while
    Eclipse has GUI builder plugins available
  • In this class, Ive installed NetBeans 5 and
    Eclipse 3.2

3
Why Use an IDE?
  • IDEs allow for refactoring
  • rename a class or method, and all
    instances/references to it EVERYWHERE are updated
    automatically
  • Code completion
  • You type in an object name and a ., and then
    the IDE shows you all available methods
    (including signatures)
  • Debugging
  • You just click on a line of code and execution
    stops there, allowing you to quickly inspect
    variables
  • Code generation
  • IDEs automate some mundane coding tasks like
    creating getter and setter methods for a field
  • JavaDocs (automatically creates much of it for
    you)
  • And on, and on.

4
Eclipse
  • The Eclipse IDE was largely developed by IBM
  • http//eclipse.org/
  • Very popular and free
  • Developed with SWT (Standard Widget Toolkit), not
    Swing, so it works fine on many OSs, but there
    have been problems with Mac OS/X
  • Relies on plugins for GUI development (Visual
    Editor)
  • You can import existing projects (that use an
    existing Ant script) into Eclipse
  • You can also create a new Eclipse project that
    will automatically detect and include existing
    code (packages) that you may have written
  • Eclipse is the backbone of the new AWIPS 2
    project being developed by Raytheon

5
Eclipse Help/Tutorials -1
6
Eclipse Help/Tutorials -2
7
Eclipse Help/Tutorials -3
8
Eclipse IDE -1
9
Eclipse IDE -2
  • Eclipse is highly configurable
  • Go to Windows menu, Preferences to configure the
    IDE, how automatic code generation is formatted,
    colors, etc
  • Eclipse has different perspectives (or IDE
    window layouts)
  • Things look a bit different when you are editing
    code (usually done in the Java perspective)
  • Or when you are debugging code (done in the Debug
    perspective)
  • There is a button for changing perspectives in
    the upper right corner of Eclipse (and from the
    Window menu, Open Perspective option

10
Eclipse IDE -3
  • Run Configurations enable you to specify
    different configurations for running your
    program. Go to Run menu, Run option
  • A config can specify a main class (program
    starting point), run time JVM options (like
    memory alloc), etc.

11
Eclipse and Hello World -1
  • Create a new Java program
  • File menu, New Project, Java Project (click Next)
  • Choose project name (e.g. test)
  • you can either let Eclipse put the project in the
    default directory
  • or you can specify your own directory
  • Choose "Finish"
  • Click on "Java perspective" button on upper right
  • Right click on "test" in the navigator window,
    and select new Java class
  • can specify an optional package name (leave blank
    for now)

12
Eclipse and Hello World -2
  • Type in a class name in the box next to "Name"
  • can specify an optional superclass
  • can specify optional interfaces to implement
  • check the create "public static void main(..."
    box
  • click the Finish button
  • You now have a class which you can edit
  • type the code in the main methodSystem.out.print
    ln("Hello")
  • Click on the Run menu, Run... Option
  • The class you just created should be your main
    class
  • Click on the New button on bottom left
  • Specify any optional arguments on the Arguments
    tab
  • Click on the Run button to run your program!

13
Eclipse and Hello World -3
  • Now add another couple of lines to your Hello
    World program
  • String s This is a string
  • System.out.println(s s)
  • Now run the program in debug mode and set a
    breakpoint on the second line (above)
  • Execution should stop there and if you move the
    mouse over the variable s, youll see the value
    in s

14
NetBeans IDE -1
  • NetBeans is very similar to Eclipse
  • Developed by Sun (the makers of Java)
  • Includes a nice GUI builder (called Matisse)
  • Also completely free (works on all OSs)

15
NetBeans IDE -2
16
Which IDE to Use?
  • Since many people in this class will be working
    on AWIPS related development (based on Eclipse),
    I will use Eclipse in class
  • If you love NetBeans, Ive installed it on every
    machine and you are welcome to use it
  • There is no clear cut answer to the question,
    which IDE is the best? Eclipse, NetBeans, and
    JBuilder are all comparable (it is unclear,
    however, whether Borland will continue to support
    Jbuilder)
  • IntelliJ IDEA might be the best of all (for 100)
Write a Comment
User Comments (0)
About PowerShow.com