O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting Started with Eclipse Juno

Book Description

Whatever level of Java programming you’re at, this book is a revelation. It enables you to begin using Eclipse Juno to automate common development tasks and much more. A practical guide to Integrated Development Environments.

  • Learn subjects ranging from basic Java development to web app development, version control, and GUI programming
  • Discover how to use Eclipse to develop, test, and debug basic desktop Java applications proficiently
  • Integrate JUnit 4, the most widely used unit testing framework, into Eclipse
  • Get to grips with how Eclipse can be used to develop web-based Java applications that employ Java Servlets and JavaServer Pages

In Detail

Integrated Development Environments (IDEs) such as Eclipse are examples of tools that help developers by automating an assortment of software development-related tasks. By reading this book you will learn how to get Eclipse to automate common development tasks, which will give you a boost of productivity.

Getting Started with Eclipse Juno is targeted at any Java programmer interested in taking advantage of the benefits provided by a full-fledged IDE. This book will get the reader up to speed with Eclipse’s powerful features to write, refactor, test, debug, and deploy Java applications.

This book covers all you need to know to get up to speed in Eclipse Juno IDE. It is mainly tailored for Java beginners that want to make the jump from their text editors to a powerful IDE. However, seasoned Java developers not familiar with Eclipse will also find the hands-on tutorials in this book useful.

The book starts off by showing how to perform the most basic activities related to implementing Java applications (creating and organizing Java projects, refactoring, and setting launch configurations), working up to more sophisticated topics as testing, web development, and GUI programming.

This book covers managing a project using a version control system, testing and debugging an application, the concepts of advanced GUI programming, developing plugins and rich client applications, along with web development.

Table of Contents

  1. Getting Started with Eclipse Juno
    1. Table of Contents
    2. Getting Started with Eclipse Juno
    3. Credits
    4. About the Authors
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Introduction
      1. How to use this book
      2. Downloading and installing Eclipse
      3. Eclipse Juno – new and noteworthy
      4. Summary
    9. 2. Java Development
      1. Creating a Java project
        1. Creating a Java class
        2. Creating working sets
      2. Importing a Java project
        1. Importing a project from Version Control Servers
      3. Introducing Java views
        1. The Package Explorer view
        2. The Java Editor view
          1. Compiling errors and warnings annotations
          2. Content assist
          3. Code navigation
          4. Quick fix
          5. Customizing the editor
        3. The Problems view
          1. Customizing the Problems view
        4. The Outline view
        5. The Type Hierarchy view
        6. The Call Hierarchy view
        7. Organizing imports
        8. Save actions
        9. Enforcing Coding Style with Formatter
      4. Generating code
        1. Generating getters and setters
        2. Generating constructors
        3. Generating the hashCode() and equals() methods
        4. Generating the toString() method
        5. Generating method comments
        6. Editing code and comment templates
      5. Refactoring
        1. Renaming variables
        2. Modifying a method's signature
      6. Building and running the project
        1. Creating a launch configuration
      7. Managing the project build path
      8. Summary
    10. 3. Unit Testing with JUnit and Debugging
      1. Testing with JUnit – getting started
        1. Setting up JUnit
        2. Testing with JUnit
        3. Implementing the test methods generated by Eclipse
        4. An overview of the Eclipse JUnit Runner view
        5. Creating test cases
      2. Debugging when problems arise
      3. Summary
    11. 4. Version Control Systems
      1. CVS
        1. Repository
        2. Checking out a project
        3. Synchronizing
        4. Branches
      2. SVN
      3. Git
      4. Summary
    12. 5. SWT
      1. Getting started
        1. Setting up
        2. Widgets
        3. Displays
      2. Controls
        1. The Label widgets
        2. The Text widgets
        3. The Button widgets
        4. The List widgets
        5. The Combo widgets
      3. Layouts
        1. FillLayout
        2. RowLayout
        3. GridLayout
      4. New and noteworthy
      5. Summary
    13. 6. More SWT
      1. Events
      2. Typed and untyped events
        1. KeyEvent
        2. MouseEvent
      3. Menus
      4. Toolbars
      5. Tables
      6. Dialogs
        1. MessageBox
        2. FileDialog
        3. ColorDialog
        4. FontDialog
        5. PrintDialog
      7. Summary
    14. 7. Web Development Using Eclipse WTP
      1. Brief introduction to the benefits of Java web application technologies
      2. Understanding servlets
      3. Understanding JavaServer Page
      4. Getting started with Apache Tomcat
      5. Installing Tomcat
      6. Eclipse Web Tools Platform
        1. Configuring the server
      7. The servlet lifecycle
      8. Implementing your very first Java servlet using Eclipse WTP
        1. A more elaborate example – yet another calculator
        2. Deploying the calculator example
      9. Implementing your very first JSP using Eclipse WTP
      10. Generating WAR files
      11. Summary
    15. 8. Eclipse Development
      1. Creating your first plugin
      2. Running and debugging a plugin project
        1. Running and debugging configurations
      3. Extension points
        1. Declaring an extension point
          1. Providing interfaces
        2. Using extension points implementation in code
        3. Implementing an extension point
      4. Contributing to the platform's menus and toolbars
        1. Actions versus commands
          1. org.eclipse.ui.menus
          2. org.eclipse.ui.commands
          3. org.eclipse.ui.handlers
          4. Restricting and disabling contributions
          5. The Plugin Spy feature
        2. Creating new views
          1. Saving the view's current state
          2. Adding context help to your view
          3. Example of a new view
      5. Exporting a plugin
      6. Summary
    16. 9. Eclipse Rich Client Platform
      1. Understanding a Rich Client Platform
      2. The Eclipse Rich Client Platform
        1. OSGi framework implementation
          1. The module layer
          2. The life cycle layer
          3. The service layer
          4. The security layer
        2. SWT
        3. JFace
        4. Eclipse workbench
      3. Developing a client application using the Eclipse RCP
        1. Creating a new client application project using a template
          1. A closer look at the generated source code
      4. Running and debugging RCP applications
      5. Expanding the example – creating a contact list application
        1. The contact list view
        2. The contact editor
        3. The Save and New commands and menu entries
        4. Tying up the two views
        5. Running the application
      6. Packaging and branding an Eclipse RCP application
        1. Branding an Eclipse RCP application
      7. Summary
    17. A. Keyboard Shortcuts
      1. File editor shortcuts
        1. Code edition shortcuts
        2. Code generation and code refactoring shortcuts
        3. Code navigation shortcuts
        4. Java shortcuts
      2. File shortcuts
      3. Run and debug shortcuts
      4. Views shortcuts
    18. Index