org. 1435

Download Org.  1435

Post on 28-Nov-2014

40 views

Category:

Documents

1 download

Embed Size (px)

TRANSCRIPT

Basic tutorial

Adam Kiezun M Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation bo

Basic tutorial

Table of ContentsBasic tutorial......................................................................................................................................................1 . Preparing Eclipse...............................................................................................................................................2 Verifying JRE installation and classpath variables .................................................................................2 Java projects........................................................................................................................................................5 Java builder.........................................................................................................................................................6 Build classpath....................................................................................................................................................7 Classpath variables.............................................................................................................................................8 Java development tools (JDT) ............................................................................................................................9 Debugger............................................................................................................................................................10 Breakpoints ........................................................................................................................................................11 Adding breakpoints.........................................................................................................................................12 Java perspectives...............................................................................................................................................13 Java........................................................................................................................................................13 Java Browsing........................................................................................................................................13 Java Type Hierarchy..............................................................................................................................13 Debug.....................................................................................................................................................13 Java views..........................................................................................................................................................15 Package Explorer view..........................................................................................................................15 Hierarchy view.......................................................................................................................................15 Projects view..........................................................................................................................................15 Packages view........................................................................................................................................15 Types view.............................................................................................................................................15 Members view ........................................................................................................................................15 Changing the appearance of the console view...............................................................................................17 Console view.....................................................................................................................................................18 Stepping through the execution of a Java program......................................................................................19 Step over...............................................................................................................................................19 Step into................................................................................................................................................19 Step into Selection................................................................................................................................19 Step with filters.....................................................................................................................................19 Run to return.........................................................................................................................................19 Run to line.............................................................................................................................................20

i

Basic tutorial

Table of ContentsLaunching a Java program.............................................................................................................................21 Java editor.........................................................................................................................................................22 Opening an editor for a selected element.......................................................................................................23 Using the Java editor.......................................................................................................................................24 Generating getters and setters........................................................................................................................25 Creating a new class in an existing compilation unit....................................................................................26 Creating a new Java class ................................................................................................................................27 Creating Java elements ....................................................................................................................................28 Creating a new Java project...........................................................................................................................29 Creating a Java project as its own source container....................................................................................30 Creating a Java project with source folders..................................................................................................31 Creating a new source folder..........................................................................................................................33 Java Build Path page........................................................................................................................................34 Source tab ...............................................................................................................................................34 Projects tab.............................................................................................................................................34 Libraries tab...........................................................................................................................................35 Order and Export tab ..............................................................................................................................36 Default output folder..............................................................................................................................36 File actions........................................................................................................................................................37 New Java Project Wizard.................................................................................................................................39 Project name page..................................................................................................................................39 Java settings page ...................................................................................................................................39 Java Compiler..................................................................................................................................................41 General..................................................................................................................................................41 JDK Compliance.............................................................................................................................41 Classfile generation.........................................................................................................................41 Building................................................................................................................................................42 General............................................................................................................................................42 Build path problems........................................................................................................................42 Output folder...................................................................................................................................43 Errors/Warnings....................................................................................................................................43 Code style