This tutorial describes the usage of Eclipse as a Java IDE. It
describes the
installation of Eclipse, the creation of Java programs
and tips for using Eclipse.
This tutorial is based on Eclipse 4.2
(Juno).
1. What is Eclipse?
Eclipse is created by an Open Source community and is used in several different areas, e.g. as a development environment for Java or Android applications. Eclipse's roots go back to 2001.
The Eclipse Open Source community has over 200 Open Source projects covering different aspects of software development.
The Eclipse projects are governed by the Eclipse Foundation. The Eclipse Foundation is a non-profit, member supported corporation that hosts the Eclipse Open Source projects and helps to cultivate both an Open Source community and an ecosystem of complementary products and services.
The Eclipse IDE can be extended with additional software components. Eclipse calls these software components plug-ins. Several Open Source projects and companies have extended the Eclipse IDE.
It is also possible to use Eclipse as a basis for creating general purpose applications. These applications are known as Eclipse Rich Client Platform (Eclipse RCP) applications.
The
Eclipse Public License
(EPL) is an Open Source software license used
by the
Eclipse Foundation
for its software. The EPL is designed to be
business-friendly. EPL
licensed programs can be used, modified, copied
and distributed free of
charge and receiver of EPL-licensed software
can choose to use this
software in closed source programs. Only
modifications in the original
EPL code must be
released.
The Eclipse Foundation also validates that source code contributed to Eclipse projects is free of Intellectual property (IP) issues. This process is known as IP cleansing.
The permissive EPL and the IP cleansing effort of the Eclipse Foundation makes reusing the source code of Eclipse projects attractive.
The Eclipse Foundation also validates that source code contributed to Eclipse projects is free of Intellectual property (IP) issues. This process is known as IP cleansing.
The permissive EPL and the IP cleansing effort of the Eclipse Foundation makes reusing the source code of Eclipse projects attractive.
Eclipse requires an installed
Java
Runtime. Eclipse 4.2 requires
at least Java 5 to run.
For this tutorial you should use Java in version 6 or higher.
The Eclipse IDE contains its own Java compiler. The Java Development Tools are required if you compile Java source code outside Eclipse and for advanced development scenarios, for example if you use automatic builds or if you develop web development.
For this tutorial you should use Java in version 6 or higher.
The Eclipse IDE contains its own Java compiler. The Java Development Tools are required if you compile Java source code outside Eclipse and for advanced development scenarios, for example if you use automatic builds or if you develop web development.
Java might already be
installed on your machine. You can test
this by
opening a console
(if you are using Windows: Win+R, enter
cmd
and press Enter) and by typing in the
following command:
If Java is correctly installed, you should see some information about your Java installation. If the command line returns the information that the program could not be found, you have to install Java. The central website for installing Java is the following URL:
If you have problems installing Java on your system, a Google search for How to install JDK on
java -version
If Java is correctly installed, you should see some information about your Java installation. If the command line returns the information that the program could not be found, you have to install Java. The central website for installing Java is the following URL:
http://java.com
If you have problems installing Java on your system, a Google search for How to install JDK on
YOUR_OS
should result
in
helpful links. Replace
YOUR_OS
with your
operating
system, e.g.
Windows,
Ubuntu, Mac OS X, etc.
The Eclipse IDE consists out of components and it is possible to
configure the selected components. The Eclipse.org
website provides
pre-packaged Eclipse
distributions to provide downloads for typical
use cases. The
Eclipse IDE for Java
Developers
distribution is specifically designed for
standard Java development.
Download the Eclipse IDE for Java Developers package from the following URL. Ensure that you download the right version for your Java version (32 bit vs. 64 bit).
The following screenshot shows the Eclipse download website for a Linux system, press on the link beside the package, e,g, Linux 64 Bit to start the download.
The download is a
Download the Eclipse IDE for Java Developers package from the following URL. Ensure that you download the right version for your Java version (32 bit vs. 64 bit).
http://www.eclipse.org/downloads
The following screenshot shows the Eclipse download website for a Linux system, press on the link beside the package, e,g, Linux 64 Bit to start the download.
The download is a
.zip
file.
After you downloaded the
Most operating system can extract zip files in their file browser, e.g. Windows7 via right mouse click on the file and selecting "Extract all...".
If in doubt, search via Google for "How to unzip a file on ...", replacing "..." with your operating system.
Use a directory path which does not contain spaces in its name, as Eclipse sometimes has problems with that.
After unpacking the zip file, Eclipse is ready to be used; no additional installation procedure is required.
.zip
file with the Eclipse distribution you unpack it to a local
directory.
Most operating system can extract zip files in their file browser, e.g. Windows7 via right mouse click on the file and selecting "Extract all...".
If in doubt, search via Google for "How to unzip a file on ...", replacing "..." with your operating system.
Use a directory path which does not contain spaces in its name, as Eclipse sometimes has problems with that.
After unpacking the zip file, Eclipse is ready to be used; no additional installation procedure is required.
To start Eclipse double-click on the file
The system will prompt you for a workspace. The workspace is the place in which you work. Select an empty directory and press the button.
Eclipse will start and show the Welcome page. Close the welcome page by pressing the X beside Welcome.
After you closed the welcome screen you should see a screen similar to the following.
eclipse.exe
(Microsoft Windows) or
eclipse
(Linux / Mac) in the directory where you
unpacked Eclipse.
The system will prompt you for a workspace. The workspace is the place in which you work. Select an empty directory and press the button.
Eclipse will start and show the Welcome page. Close the welcome page by pressing the X beside Welcome.
After you closed the welcome screen you should see a screen similar to the following.
The appearance of Eclipse can be changed. By default Eclipse
ships with a few themes but you can also extend Eclipse with new
themes. The appendix of this tutorial lists
popular themes.
To change the appearance, select from the menu → → → .
The Theme selection allows you to change the appearance of your Eclipse IDE. Disabling the animations will make your Eclipse run faster.
Please note that you need to restart Eclipse to apply a new styling correctly.
To change the appearance, select from the menu → → → .
The Theme selection allows you to change the appearance of your Eclipse IDE. Disabling the animations will make your Eclipse run faster.
Please note that you need to restart Eclipse to apply a new styling correctly.
5. Important Eclipse terminology
Eclipse provides Perspectives, Views and Editors. Views and Editors are grouped into Perspectives.
The
workspace
is the physical location (file path) you are
working in. Your
projects,
source files, images and other artifacts
can be
stored and
saved in
your workspace. It is also possible to refer to external
resources,
e.g. projects,
in the
workspace.
You can choose the workspace during startup of Eclipse or via the menu ( → → ) .
You can choose the workspace during startup of Eclipse or via the menu ( → → ) .
An Eclipse project contains source, configuration and binary
files
related to a
certain task and groups them into buildable and
reusable
components. An Eclipse project can have
natures
assigned to it which describe the purpose of this project. For
example the Java
nature
defines a project as Java project.
Natures for a project are defined via the
Projects in Eclipse cannot contain other projects.
Natures for a project are defined via the
.project
file in the project directory.
Projects in Eclipse cannot contain other projects.
Parts
are user interface components which allow you to navigate and modify
data.
Parts
are typically divided into
Views
and
Editors.
The distinction into Views and Editors is primarily not based on technical differences, but on a different concept of using and arranging these Parts.
A view is typically used to work on a set of data, which might be a hierarchical structure. If data is changed via the view, this change is typically directly applied to the underlying data structure. A view sometimes allows us to open an Editor for a selected set of data.
An example for a view is the Java Package Explorer, which allows you to browse the files of Eclipse projects. If you change data in the Package Explorer, e.g. renaming a file, the file name is directly changed on the file system.
Editors are typically used to modify a single data element, e.g. a file or a data object. To apply the changes made in an editor to the data structure, the user has to explicitly save the editor content.
Editors were traditionally placed in a certain area, called the editor area. Until Eclipse 4 this was a hard limitation. Eclipse 4 applies no technical restrictions on Editors, they can be freely positioned.
For example the Java Editor is used to modify Java source files. Changes to the source file are applied once the user selects the Save command.
The distinction into Views and Editors is primarily not based on technical differences, but on a different concept of using and arranging these Parts.
A view is typically used to work on a set of data, which might be a hierarchical structure. If data is changed via the view, this change is typically directly applied to the underlying data structure. A view sometimes allows us to open an Editor for a selected set of data.
An example for a view is the Java Package Explorer, which allows you to browse the files of Eclipse projects. If you change data in the Package Explorer, e.g. renaming a file, the file name is directly changed on the file system.
Editors are typically used to modify a single data element, e.g. a file or a data object. To apply the changes made in an editor to the data structure, the user has to explicitly save the editor content.
Editors were traditionally placed in a certain area, called the editor area. Until Eclipse 4 this was a hard limitation. Eclipse 4 applies no technical restrictions on Editors, they can be freely positioned.
For example the Java Editor is used to modify Java source files. Changes to the source file are applied once the user selects the Save command.
A
Perspective
is a visual container for a set of
Parts. The Eclipse IDE uses
Perspectives
to arrange
Parts
and configure the menu and the toolbar
for different development tasks.
Open
Editors
are shared between
Perspectives, i.e. if you have an editor open in the
Java
perspective for a certain class and switch to the
Debug
perspective, this editor stays open.
You can switch Perspectives in your Eclipse IDE via the → → menu entry.
The main perspectives used in the Eclipse IDE are the Java perspective for Java development and the Debug perspective for debugging Java applications.
You can change the layout and content within a Perspective by opening or closing Parts and by re-arranging them.
To open a new Part in your current Perspective use the → → menu entry. The following Show View dialog allows you to search for certain Parts.
In case you want to reset your current perspective to its default, you can use the → menu entry.
You can save your Perspective via → .
The → menu entry allows you to adjust the selected perspective. For example you can hide or show toolbar and menu entries.
You can switch Perspectives in your Eclipse IDE via the → → menu entry.
The main perspectives used in the Eclipse IDE are the Java perspective for Java development and the Debug perspective for debugging Java applications.
You can change the layout and content within a Perspective by opening or closing Parts and by re-arranging them.
To open a new Part in your current Perspective use the → → menu entry. The following Show View dialog allows you to search for certain Parts.
In case you want to reset your current perspective to its default, you can use the → menu entry.
You can save your Perspective via → .
The → menu entry allows you to adjust the selected perspective. For example you can hide or show toolbar and menu entries.
The application toolbar contains actions which you typically
perform, e.g. creating Java resources or running Java projects. It
also allows to switch between opened perspectives.
The
Java
perspective contains useful
Views
which allow you to work with your Java project. The following
description explains the most important ones.
The
Package Explorer
view
allows you to browse the structure of your projects and to open files
in an
Editor
via a
double-click on the file.
It is also used to change the structure of your project. For example you can rename files or move files and folders via drag and drop. A right-click on a file or folder shows you the available options.
It is also used to change the structure of your project. For example you can rename files or move files and folders via drag and drop. A right-click on a file or folder shows you the available options.
The
Javadoc
view
shows the documentation of the selected element in the Java editor.
The following describes how to create a minimal Java program
using Eclipse. It is tradition in the programming world to create a
small program which writes "Hello World" to the console. We will adapt
this tradition and will
write "Hello Eclipse!" to the console.
This tutorial uses the naming convention that the project is named
the same as the top-level package in the project.
Select from the menu → → . Enter
Press the button to create the project. A new project is created and displayed as a folder. Open the
Select from the menu → → . Enter
de.vogella.eclipse.ide.first
as the project name. Select the
Create
separate folders for
sources and class files
flag.
Press the button to create the project. A new project is created and displayed as a folder. Open the
de.vogella.eclipse.ide.first
folder and explore the content of this folder.
In the following step you create a new
To create the
Enter the name of your new package in the dialog and press the button.
package
. A good convention for the project and package name is to use the
same name
for the top level package
and
the
project. For example if you
name your project
com.example.javaproject
you should also use
com.example.javaproject
as top level package name.
To create the
de.vogella.eclipse.ide.first
package, select the folder
src
, right-click on it and select
→ .
Enter the name of your new package in the dialog and press the button.
Create a Java class. Right-mouse click on your package and
select
→ .
Enter
Press the button.
This creates a new file and opens the Editor for Java source files. Change the class to the following example.
You could also directly create new packages via this dialog. If you enter a new package in this dialog, it is created automatically.
Enter
MyFirstClass
as the class name and
select the
public static void main
(String[] args)
flag.
Press the button.
This creates a new file and opens the Editor for Java source files. Change the class to the following example.
package de.vogella.eclipse.ide.first; public class MyFirstClass { public static void main(String[] args) { System.out.println("Hello Eclipse!"); } }
You could also directly create new packages via this dialog. If you enter a new package in this dialog, it is created automatically.
Now run your code. Either right-click on your Java class in the
Package Explorer
or right-click in the Java class and
select
→ .
Eclipse will run your Java program. You should see the output in the Console view.
Congratulations! You created your first Java project, a package, a Java class and you ran this program inside Eclipse.
Eclipse will run your Java program. You should see the output in the Console view.
Congratulations! You created your first Java project, a package, a Java class and you ran this program inside Eclipse.
To run your Java program outside of the Eclipse IDE you need to
export
it as a
Select your project, right-click on it and select the Export menu entry. .
Select JAR file, select next. Select your project and maintain the export destination and a name for the jar file. I named it
Press finish. This creates a jar file in your selected output directory.
Congratulations! You created your first Java project, a package, a Java class and you ran this program inside Eclipse.
.jar
file. A
.jar
file is the standard distribution format for Java applications.
Select your project, right-click on it and select the Export menu entry. .
Select JAR file, select next. Select your project and maintain the export destination and a name for the jar file. I named it
myprogram.jar
.
Press finish. This creates a jar file in your selected output directory.
Congratulations! You created your first Java project, a package, a Java class and you ran this program inside Eclipse.
Open a command shell, e.g. under Microsoft Windows select
→
and type
Switch to your output directory, by typing
To run this program you include the jar file into your
Type the above command in the directory you used for the export and you see the "Hello Eclipse!" output in your command shell.
cmd
and press enter. This should open a console.
Switch to your output directory, by typing
cd path
. For example if
your
jar is located in
c:\temp
type
cd c:\temp
.
To run this program you include the jar file into your
classpath
. The
classpath
defines what Java classes are available to the Java
runtime. You can
add a
jar
file to the classpath with the
-jar
option.
java -classpath myprogram.jar de.vogella.eclipse.ide.first.MyFirstClass
Type the above command in the directory you used for the export and you see the "Hello Eclipse!" output in your command shell.
You can export and import Eclipse projects. This allows you to
to
share your projects with other people and to use existing projects.
To export Eclipse projects, select → → → and select the projects you want to export.
To export Eclipse projects, select → → → and select the projects you want to export.
The primary way of navigating through your project is the
Package explorer. You can open nodes in the tree and open a file in an editor
by
double-clicking on the corresponding entry in the
Package explorer.
The drop-down menu in the package explorer allow you to filter the resources which should be displayed or hidden.
The drop-down menu in the package explorer allow you to filter the resources which should be displayed or hidden.
You can also activate editors which are already open directly by
clicking on their tab.
The
Link with Editor
toggle button allows you to synchronize the selection in the package
explorer
with the currently selected editor. This way you see directly
in the
package explorer the file for the editor which currently has
the
focus.
You can also activate the breadcrumb mode for your Java editor
which allows you to navigate your source code directly from your Java
editor.
You can activate this mode via right-click in the editor and by selecting the Show in Breadcrumb entry.
This allows you to navigate your source code from your editor as depicted in the following screenshot.
To hide it again, right-click on a breakcrump entry and select Hide Breadcrumb.
You can activate this mode via right-click in the editor and by selecting the Show in Breadcrumb entry.
This allows you to navigate your source code from your editor as depicted in the following screenshot.
To hide it again, right-click on a breakcrump entry and select Hide Breadcrumb.
You can also use other means than the Package Explorer to
navigate your source code. The following description lists the most
important ones.
You can navigate between the classes in your project via the
Package
Explorer
view. You can navigate the tree and open a file via double-click.
In addition you can open any class by positioning the cursor on the class in an editor and pressing F3. Alternatively, you can press Ctrl+Shift+T. This will show a dialog in which you can enter the class name to open it.
You can also search for package names. Each part of the package name must end with a
The Open Type Dialog also supports camel-case like search, e.g. it matches capital letters in the class name. For example if you would search for the
To avoid suffix matching you can add a space after the class name. For example you can type Selection (there is a space after selection) to match the
In addition you can open any class by positioning the cursor on the class in an editor and pressing F3. Alternatively, you can press Ctrl+Shift+T. This will show a dialog in which you can enter the class name to open it.
You can also search for package names. Each part of the package name must end with a
.
so that the
Open Type Dialog
can identify it as package. You only need to specify part of each
segment of the package name. Assume for example that you search for
the
org.eclipse.swt.widgets.Button
class. To
find this class you can use the search term
org.eclipse.swt.widgets.Button
or
o.e.s.w.Button
or
o.Button
The Open Type Dialog also supports camel-case like search, e.g. it matches capital letters in the class name. For example if you would search for the
OnTouchListener
class you could use
OTL
or
OToList
as search term.
To avoid suffix matching you can add a space after the class name. For example you can type Selection (there is a space after selection) to match the
Selection
class but not the
SelectionListener
class.
If you right-click in your Java editor, you can select the
Quick Outline
option which shows you an outline of your Java class with the option
to filter.
The shortcut for opening the Quick Outline is Ctrl+O. By default Quick Outline shows only the direct members and fields of the class. Press Ctrl+O again to show also the inherited members and fields.
The default look of the Quick Outline option is similiar to the Quick Outline view of the Java perspective.
The shortcut for opening the Quick Outline is Ctrl+O. By default Quick Outline shows only the direct members and fields of the class. Press Ctrl+O again to show also the inherited members and fields.
The default look of the Quick Outline option is similiar to the Quick Outline view of the Java perspective.
The type hierarchy of a class shows you which classes it extends
and
which interfaces it implements. You can use the type hierarchy to
navigate to one of these elements.
To open the type hierarchy of the selected class, right-click in the editor and select Open Type Hierarchy (Shortcut: F4) or Quick Type Hierarchy (Shortcut: Ctrl+T).
To open the type hierarchy of the selected class, right-click in the editor and select Open Type Hierarchy (Shortcut: F4) or Quick Type Hierarchy (Shortcut: Ctrl+T).
Via the
→
menu (Shortcut:
Ctrl+H) you can open the search dialog of Eclipse.
Use the Java Search tab to search for Java elements, e.g. methods.
The search shows all references for the selected scope. You can double-click on a search entry to navigate to the corresponding position in the editor.
Use the File Search tab to search for text.
Eclipse associates file extensions with the default tab. You can customize the available search tabs via the Customize button in the Search dialog.
The Search view allows you to delete search results via the Delete key.
Use the Java Search tab to search for Java elements, e.g. methods.
The search shows all references for the selected scope. You can double-click on a search entry to navigate to the corresponding position in the editor.
Use the File Search tab to search for text.
Eclipse associates file extensions with the default tab. You can customize the available search tabs via the Customize button in the Search dialog.
The Search view allows you to delete search results via the Delete key.
You can use the
Ctrl+j
shortcut to activate
Incremental Find. This allows you to search in the current active editor for a text
which is displayed in the status line as depicted by the following
screenshot.
The advantage of this search is that no pop-up dialog is opened which blocks other elements in the Eclipse IDE.
The advantage of this search is that no pop-up dialog is opened which blocks other elements in the Eclipse IDE.
If you have selected an element in the editor you can use the
Ctrl+k
shortcut to search for the next occurance of the selected text and
Ctrl+Shift+k
for the previous element.
You can also navigate via the annotation buttons, e.g. for
jumping
to the next error or warning in your source code.
By pressing the buttons you can navigate to the related annotations. You can also use the keyboard shortcut Ctrl+. for selecting the next annotation or Ctrl+, for selecting the previous annotation.
The following screenshot shows source code with two warnings and one error and you can navigate between the corresponding code via the annotation buttons.
Which annotations are relevant for navigation can be configured via the drop-down menu.
By pressing the buttons you can navigate to the related annotations. You can also use the keyboard shortcut Ctrl+. for selecting the next annotation or Ctrl+, for selecting the previous annotation.
The following screenshot shows source code with two warnings and one error and you can navigate between the corresponding code via the annotation buttons.
Which annotations are relevant for navigation can be configured via the drop-down menu.
Similar to your Java source code you can navigate between other files
in your project via the
Package
Explorer
view. You can navigate the tree and open a file via double-click.
In addition you can open any file in your projects via the Open Resource dialog which can be opened via the Ctrl+Shift+R shortcut. This will show a dialog in which you can enter the resource name to open it.
In addition you can open any file in your projects via the Open Resource dialog which can be opened via the Ctrl+Shift+R shortcut. This will show a dialog in which you can enter the resource name to open it.
Content assist
is a functionality in Eclipse which
allows the developer get context
sensitive content completion upon user
request.
It can be invoked by pressing Ctrl+Space
For example type
If you have a reference to an object, for example the object
It can be invoked by pressing Ctrl+Space
For example type
syso
in the editor of a Java source file
and
then press
Ctrl+Space. This will replace
syso
with
System.out.println("")
.
If you have a reference to an object, for example the object
person
of the type
Person
and
need to see its
methods, type
person.
and
press
Ctrl+Space.
Whenever Eclipse detects a problem, it will underline the
problematic
text in the editor. Select the underlined text and press
Ctrl+1
to see proposals how to solve this problem. This functionality is
called
Quick Fix.
For example type
Quick Fix is extremely powerful. For example it allows you to create new local variables and fields as well as new methods and new classes. Or it can put try-catch statements around your exceptions. It can also assign a statement to a variable and much more.
Quick Fix also gives several options for code changes on code which does not contain errors, e.g. it allows you to convert a local variable to a field.
For example type
myBoolean = true;
If myBoolean is not yet
defined, Eclipse will highlight it as an
error. Select the variable
and press
Ctrl+1, Eclipse will
suggest creating a field or
local variable.
Quick Fix is extremely powerful. For example it allows you to create new local variables and fields as well as new methods and new classes. Or it can put try-catch statements around your exceptions. It can also assign a statement to a variable and much more.
Quick Fix also gives several options for code changes on code which does not contain errors, e.g. it allows you to convert a local variable to a field.
Eclipse has several possibilities to generate code for you. This
can save significant time during development.
For example Eclipse can override methods from superclasses and generate the
You can find these options in the Source menu.
To test the source generation, create the following class in your
Select → , mark both fields and press the OK button.
Select → , select again both of your fields and then the OK button.
Select → , mark again both fields and press the OK button.
You created the following class:
For example Eclipse can override methods from superclasses and generate the
toString()
,
hashcode()
and
equals()
methods. It
can also generate getter and setter methods for attributes
of
your Java class.
You can find these options in the Source menu.
To test the source generation, create the following class in your
de.vogella.eclipse.ide.first
project.
package de.vogella.eclipse.ide.first; public class Person { private String firstName; private String lastName; }
Select → , mark both fields and press the OK button.
Select → , select again both of your fields and then the OK button.
Select → , mark again both fields and press the OK button.
You created the following class:
package de.vogella.eclipse.ide.first; public class Person { private String firstName; private String lastName; public Person(String firstName, String lastName) { super(); this.firstName = firstName; this.lastName = lastName; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } @Override public String toString() { return "Person [firstName=" + firstName + ", lastName=" + lastName + "]"; } }
In this exercise you practice the usage of code generation and
the
usage of the
Content Assists
functionality.
Create the
Select → to generate a constructor using all fields.
Use the → to create getters and setters for all fields.
The resulting class should look like the following listing.
Use Eclipse to generate a
Also use Eclipse to generate a
com.vogella.ide.todo
package
and the
following class.
package com.vogella.ide.todo; import java.util.Date; public class Todo { private long id; private String summary = ""; private String description = ""; private boolean done = false; private Date dueDate; }
Select → to generate a constructor using all fields.
Use the → to create getters and setters for all fields.
The resulting class should look like the following listing.
package com.vogella.ide.todo; import java.util.Date; public class Todo { private long id; private String summary = ""; private String description = ""; private boolean done = false; private Date dueDate; public Todo(long id, String summary, String description, boolean done, Date dueDate) { this.id = id; this.summary = summary; this.description = description; this.done = done; this.dueDate = dueDate; } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getSummary() { return summary; } public void setSummary(String summary) { this.summary = summary; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public boolean isDone() { return done; } public void setDone(boolean done) { this.done = done; } public Date getDueDate() { return dueDate; } public void setDueDate(Date dueDate) { this.dueDate = dueDate; } }
Use Eclipse to generate a
toString()
method for the
Todo
class based on the
id
and
summary
field.
This can be done via the Eclipse menu
→ .
Also use Eclipse to generate a
hashCode()
and
equals()
method based on the
id
field. This can be done via the
Eclipse menu
→ .
Create a new class called
TodoProvider
.
Create the following static method in your
TodoProvider
class.
// Helper method to get a list // of Todo objects // Example data, change if you like public static List<Todo> createInitialModel() { ArrayList<Todo> list = new ArrayList<Todo>(); list.add(createTodo("SWT", "Learn Widgets")); list.add(createTodo("JFace", "Especially Viewers!")); list.add(createTodo("DI", "@Inject looks interesting")); list.add(createTodo("OSGi", "Services")); list.add(createTodo("Compatibility Layer","Run Eclipse 3.x")); return list; } private static Todo createTodo(String summary, String description) { return new Todo(current++, summary, description, false, new Date()); }
Write another
In your main method call the
If another number than 5 is returned, throw a
Use Content assist to create the
TodoProviderTest
class
with a
public static void main (String[] args)
method.
In your main method call the
createInitialModel
method and validate that the returned number of
items is 5.
If another number than 5 is returned, throw a
RuntimeException
. If the correct number is returned, write the String "Correct" to
the
Console
view.
Use Content assist to create the
System.out.println()
based on
syso
for you.
Refactoring
is the process of restructuring the code without
changing its
behavior. For example renaming a Java class or method is
a refactoring
activity.
Eclipse supports several refactoring activities, for example
renaming
or
moving.
For example to use the Rename refactoring, you can right-click on your class (in the editor or Package Explorer) and select → to rename your class. Eclipse will make sure that all calls in your Workspace to your class or method are renamed.
The following screenshot shows how to call the Rename refactoring for a class. The cursor is positioned on the class and the user presses the right-mouse key to show the context menu.
The most important refactoring are listed in the following table.
Eclipse has much more refactorings. The available options depend on the selection in the Java editor. In most cases you should get an idea of the performed action by the naming of the refactoring operation.
For example to use the Rename refactoring, you can right-click on your class (in the editor or Package Explorer) and select → to rename your class. Eclipse will make sure that all calls in your Workspace to your class or method are renamed.
The following screenshot shows how to call the Rename refactoring for a class. The cursor is positioned on the class and the user presses the right-mouse key to show the context menu.
The most important refactoring are listed in the following table.
Table 1. Refactoring
Refactoring | Description |
---|---|
Rename | Rename a variable or class |
Extract Method | Creates a method based on the selected code in the editor |
Extract Constant |
Eclipse has much more refactorings. The available options depend on the selection in the Java editor. In most cases you should get an idea of the performed action by the naming of the refactoring operation.
For the next examples change the
MyFirstClass
class to
the following code.
package de.vogella.eclipse.ide.first; public class MyFirstClass { public static void main(String[] args) { System.out.println("Hello Eclipse!"); int sum = 0; for (int i = 1; i <= 100; i++) { sum += i; } System.out.println(sum); } }
A useful refactoring is to mark code and create a method
from
the
selected code. To use this in this exercise, mark the coding of the
"for" loop, right
click on the selection and
select
→ . Use
calculateSum
as the name of the new method.
After this refactoring the class should look like the following code.
After this refactoring the class should look like the following code.
package de.vogella.eclipse.ide.first; public class MyFirstClass { public static void main(String[] args) { System.out.println("Hello Eclipse!"); int sum = 0; sum = calculateSum(sum); System.out.println(sum); } private static int calculateSum(int sum) { for (int i = 1; i <= 100; i++) { sum += i; } return sum; } }
You can also extract strings and create constants based on the
strings. Mark for
this example the
Hello Eclipse!
string in your source code, right-click on it and
select
→ . Name your new constant "HELLO".
The string is now defined as a constant.
The string is now defined as a constant.
package de.vogella.eclipse.ide.first; public class MyFirstClass { private static final String HELLO = "Hello Eclipse!"; public static void main(String[] args) { System.out.println(HELLO); int sum = 0; sum = calculateSum(sum); System.out.println(sum); } private static int calculateSum(int sum) { for (int i = 1; i <= 100; i++) { sum += i; } return sum; } }
Eclipse provides a lot of shortcuts to work efficiently with the IDE.
For a list of the most important Eclipse shortcuts please see
Eclipse Shortcuts
You can define in Eclipse that a project uses another project.
For this
select your project, right-click on it and select
Properties.
Select Java Build Path and the Projects tab.
If you add a project to the build path of another project, you can use its classes in Eclipse.
This only works within Eclipse, outside Eclipse you need to create for the projects Java libraries and add them to the classpath of your Java application.
Select Java Build Path and the Projects tab.
If you add a project to the build path of another project, you can use its classes in Eclipse.
This only works within Eclipse, outside Eclipse you need to create for the projects Java libraries and add them to the classpath of your Java application.
The following explanation describes how to add Java libraries
to
the classpath of your
project within Eclipse.
If the libraries should be distributed with your project you can store the
For example you can create a new Java project
From the menu select → → → . Select the Java library you want to import and select the
Afterwards right-click on your project and select Properties. Under → select the button.
The following example shows how the result would look like, if the
After adding it to the classpath, you can use in Eclipse the classes contained in the
If the libraries should be distributed with your project you can store the
jar
files directly in your project.
For example you can create a new Java project
de.vogella.eclipse.ide.jars
. Then, create
a new folder called
lib
,
by right
clicking on
your project and selecting
→ .
From the menu select → → → . Select the Java library you want to import and select the
lib
folder
as target. Alternatively, just copy and paste the
jar
file into the
lib
folder.
Afterwards right-click on your project and select Properties. Under → select the button.
The following example shows how the result would look like, if the
junit-4.4.jar
file
had been added to the project.
After adding it to the classpath, you can use in Eclipse the classes contained in the
jar
file in the project. Outside Eclipse you still need to configure your
classpath, e.g. via the
MANIFEST.MF
file.
You can open any class via positioning the
cursor on
the class in
an
editor and pressing
F3. Alternatively, you
can
press
Ctrl+Shift+T. This will show a dialog in which you can enter
the
class name to open
it.
If the source code is not available, the editor will show the byte-code of that class.
This happens for example if you open a class from a the standard Java library without attaching the source code to it.
To see the source code of such a class, you can attach a source archive or source folder to a Java library. Afterwards the editor shows the source instead of the byte-code.
Attaching the source code to a library allows you also to debug this source code.
The Source Attachment dialog can be reached in the Java Build Path page of a project. To open this page right-click on a project and select → → . On the Libraries tab, expand the library's node, select the Source attachment attribute and press the button.
In the Location path field, enter the path of an archive or a folder containing the source.
The following screenshot shows this setting for the standard Java library. If you have the Java Development Kit (JDK) installed, you should find the source in the JDK installation folder. The file is typically called
If the source code is not available, the editor will show the byte-code of that class.
This happens for example if you open a class from a the standard Java library without attaching the source code to it.
To see the source code of such a class, you can attach a source archive or source folder to a Java library. Afterwards the editor shows the source instead of the byte-code.
Attaching the source code to a library allows you also to debug this source code.
The Source Attachment dialog can be reached in the Java Build Path page of a project. To open this page right-click on a project and select → → . On the Libraries tab, expand the library's node, select the Source attachment attribute and press the button.
In the Location path field, enter the path of an archive or a folder containing the source.
The following screenshot shows this setting for the standard Java library. If you have the Java Development Kit (JDK) installed, you should find the source in the JDK installation folder. The file is typically called
src.zip
.
It is also possible to add Javadoc to a library which you use.
Download the Javadoc of the jar and put it somewhere in your filesystem.
To enter the location of the Javadoc, open the Java Build Path via a right-click on a project and select → → . On the Libraries tab expand the library's node, select the
Enter the location to the file which contains the Javadoc.
Download the Javadoc of the jar and put it somewhere in your filesystem.
To enter the location of the Javadoc, open the Java Build Path via a right-click on a project and select → → . On the Libraries tab expand the library's node, select the
Javadoc location
attribute and press the
button.
Enter the location to the file which contains the Javadoc.
Eclipse contains a software component called
Update Manager
which allows you
to install and
update
software components. Installable
software components are
called
These features are contained in so-called update sites or software sites. A update site can be for example a directory on a webserver which contains installable software components and additional configuration files.
These configuration files provide aggregated information about these the software components. If Eclipse checks which software components are available on this update site it only needs to download and parse these configuration files to know the content of this update site.
To update your Eclipse installation, select → . The system searches for updates for the already installed software components. If it finds updated components, it will ask you to approve the update.
To install a new functionality, select → .
From the Work with list, select an URL from which you would like to install new software components.
To add a new update site, press the button and enter the new URL as well as a name for the new update site.
The following update sites contain the official Eclipse components.
If you select a valid update site, Eclipse allows you to install the available components. Check the components which you want to install.
Io install some components you have to uncheck the Group items by category checkbox because not all available plug-ins are categorized. If they are not categorized, they will not be displayed, unless the grouping is disabled.
features
and consist of
plug-ins
.
These features are contained in so-called update sites or software sites. A update site can be for example a directory on a webserver which contains installable software components and additional configuration files.
These configuration files provide aggregated information about these the software components. If Eclipse checks which software components are available on this update site it only needs to download and parse these configuration files to know the content of this update site.
To update your Eclipse installation, select → . The system searches for updates for the already installed software components. If it finds updated components, it will ask you to approve the update.
To install a new functionality, select → .
From the Work with list, select an URL from which you would like to install new software components.
To add a new update site, press the button and enter the new URL as well as a name for the new update site.
The following update sites contain the official Eclipse components.
# Eclipse 4.3 (Kepler release) http://download.eclipse.org/releases/kepler #Eclipse 4.2 (Juno release) http://download.eclipse.org/releases/juno
If you select a valid update site, Eclipse allows you to install the available components. Check the components which you want to install.
Io install some components you have to uncheck the Group items by category checkbox because not all available plug-ins are categorized. If they are not categorized, they will not be displayed, unless the grouping is disabled.
Eclipse also contains a client which allows installing software
components from the Eclipse
Marketplace client. The advantage of this client
is
that you can search for components,
discover popular
extensions and
see descriptions and ratings.
Compared to the update manager you do not have to know the URL for the software site which contains the installable software components.
Not all Eclipse distributions contain the Marketplace client by default. You may need to install the Marketplace client software component into Eclipse before you can use it. The following screenshot shows how to install it from one of the official Eclipse update sites.
To open the Eclipse Marketplace select → .
You can use the Find box to search for components. Pressing the button starts the installation process.
Compared to the update manager you do not have to know the URL for the software site which contains the installable software components.
Not all Eclipse distributions contain the Marketplace client by default. You may need to install the Marketplace client software component into Eclipse before you can use it. The following screenshot shows how to install it from one of the official Eclipse update sites.
To open the Eclipse Marketplace select → .
You can use the Find box to search for components. Pressing the button starts the installation process.
If you select
→
and then the
button, you can uninstall components from your Eclipse IDE.
Eclipse plug-ins are distributed as
Plug-ins are typically distributed as
If you remove plug-ins from the
jar
files.
If you want to use an Eclipse plug-in directly or don't not
know
the
update
site
for it,
you
can place it in the
dropins
folder of your Eclipse installation
directory.
Plug-ins are typically distributed as
jar
files. To add a
plug-in to your Eclipse installation, put the plug-in
.jar file into
the
Eclipse
dropins
folder
and
restart Eclipse. Eclipse should detect
the
new
plug-in and
install it
for you.
If you remove plug-ins from the
dropins
folder and restart Eclipse these plug-ins are automatically removed
from your Eclipse installation.
Eclipse allows you to export a file which
describes the installed
Eclipse components. During the export the user can select which
components should be included into this description file.
Other users can import this description file into their Eclipse installation and install the components based on this file.
This way Eclipse installation can be kept in sync with each other.
To export a description file, select → → → and select the components which should be included into your description file.
To install the described components in another Eclipse installation, open the exported file with → → → and follow the wizard. The wizard allows you to specify the components which should be installed.
Other users can import this description file into their Eclipse installation and install the components based on this file.
This way Eclipse installation can be kept in sync with each other.
To export a description file, select → → → and select the components which should be included into your description file.
To install the described components in another Eclipse installation, open the exported file with → → → and follow the wizard. The wizard allows you to specify the components which should be installed.
Eclipse p2 has a component called
director
which allows you to
install new features
via the command line.
For example the following will install the components EGit, Mylyn and EMF into an Eclipse instance.
For example the following will install the components EGit, Mylyn and EMF into an Eclipse instance.
eclipse/eclipse \ -application org.eclipse.equinox.p2.director \ -noSplash \ -repository \ http://download.eclipse.org/releases/kepler \ -installIUs \ org.eclipse.egit.feature.group,\ org.eclipse.jgit.feature.group,\ org.eclipse.emf.sdk.feature.group,\ org.eclipse.mylyn_feature.feature.group,\ org.eclipse.wst.xml_ui.feature.feature.group,\ org.eclipse.mylyn.java_feature.feature.group,\ org.eclipse.mylyn.pde_feature.feature.group
The behavior of the Eclipse IDE can be controlled via the
Preference
settings. Select
→
to open the preference settings dialog. You can use the filter box
to
search for
specific settings.
Correctly configuring Eclipse to your need can largely improve your productivity in using the Eclipse IDE.
Correctly configuring Eclipse to your need can largely improve your productivity in using the Eclipse IDE.
Eclipse can make typing more efficient by placing semicolons
at
the correct position in your source code.
In the Preference setting select → → . In the Automatically insert at correct position selection enable the Semicolons checkbox.
Afterwards you can type a semicolon in the middle of your code and Eclipse will position it at the end of the current statement.
In the Preference setting select → → . In the Automatically insert at correct position selection enable the Semicolons checkbox.
Afterwards you can type a semicolon in the middle of your code and Eclipse will position it at the end of the current statement.
Eclipse allows to escape automatically text if they are pasted
into a String literal. For example you can copy HTML code and paste
it
into a String in your Java source. Eclipse would escape the text
automatically for you.
Activate this setting via → → → → → →
Now can you paste text which requires that it is escaped. The following code snippet shows an example for the resulting code if you paste HTML code containing a link into a string literal.
Activate this setting via → → → → → →
Now can you paste text which requires that it is escaped. The following code snippet shows an example for the resulting code if you paste HTML code containing a link into a string literal.
# paste <a href="tutorials.html">Tutorials</a> # between "" of String s = "" # results in: String s = "<a href=\"tutorials.html\">Tutorials</a>";
You can configure Eclipse so that the matching brackets of a
code block are
highlighted in the source code editor.
Before the change you would not see the enclosing brackets afterwards they will be slightly highlighted. This helps to see in which block you are.
Before the change you would not see the enclosing brackets afterwards they will be slightly highlighted. This helps to see in which block you are.
Eclipse can format your source code and organize your import
statements
automatically during a save operation. This is useful as
the
Save
(shortcut:
Ctrl+S)
is easy to reach.
You can find this setting under → → .
Import statements will only be automatically created, if Eclipse finds only one valid import. If Eclipse determines more than one valid import, it will not add import statements automatically. In this case you still need to right-click in your editor and select → (shortcut: Shift+Ctrl+O).
You can find this setting under → → .
Import statements will only be automatically created, if Eclipse finds only one valid import. If Eclipse determines more than one valid import, it will not add import statements automatically. In this case you still need to right-click in your editor and select → (shortcut: Shift+Ctrl+O).
The
Save Actions
settting
automatically adds required import statements to your source
code
if there is only one possible import.
Alternatively or if there are several possible imports, you can use the Organize Imports (shortcut: Ctrl+Shift+O). If there are several alternatives, Eclipse suggests all available packages and the user has to select the right one.
To following shows the available packages for the
If you never use certain packages, for example AWT or Swing, you can exclude these packages from Eclipse via the → → → → setting.
Press the buttons to add a specific package or the button to use wildcards. The setting in the following screenshot excludes all AWT packages from the possible imports and other Java search functionality in Eclipse.
Please note that Eclipse shows (in its default configuration) only the packages which are used in the current workspace. If you want to exclude standard Java packages, you have to create at least one Java project.
Alternatively or if there are several possible imports, you can use the Organize Imports (shortcut: Ctrl+Shift+O). If there are several alternatives, Eclipse suggests all available packages and the user has to select the right one.
To following shows the available packages for the
List
class in the
Organize Imports
dialog.
If you never use certain packages, for example AWT or Swing, you can exclude these packages from Eclipse via the → → → → setting.
Press the buttons to add a specific package or the button to use wildcards. The setting in the following screenshot excludes all AWT packages from the possible imports and other Java search functionality in Eclipse.
Please note that Eclipse shows (in its default configuration) only the packages which are used in the current workspace. If you want to exclude standard Java packages, you have to create at least one Java project.
Eclipse can override existing method calls, in case you trigger
a code completion in an existing statement. Eclipse can also try to
guess
the correct actual
parameters for a method call.
With the first setting you can override methods in the middle of a statement via the Ctrl+Space code assists shortcut.
Without this setting you would get the following result, which results in a syntax error.
With this setting you get the following result.
With the first setting you can override methods in the middle of a statement via the Ctrl+Space code assists shortcut.
Without this setting you would get the following result, which results in a syntax error.
With this setting you get the following result.
Eclipse allows to start an application via the
Run
button in the menu or via the
Ctrl+F11
shortcut. By default Eclipse will determine if the currently selected
file is executable and try to start that. If is sometimes confusing,
you can configure the Eclipse IDE to start always the last started
program.
To configure that select → → → and define that always the previous launched application should be launched.
To configure that select → → → and define that always the previous launched application should be launched.
The
Editors
which are available to open a file can be configured via
→ → → → .
The button in this preference dialog allows to set the default editor for a certain file extension, e.g. this is the Editor which will be used by default if you open a new file with this extension.
The other configured Editors can be selected, if you right-click on a file and select In the sub-menu you see the available editors. The available editors depend on your Eclipse installation.
Eclipse will remember the last Editor you used to open a file and use this Editor again the next time you open the file.
The button in this preference dialog allows to set the default editor for a certain file extension, e.g. this is the Editor which will be used by default if you open a new file with this extension.
The other configured Editors can be selected, if you right-click on a file and select In the sub-menu you see the available editors. The available editors depend on your Eclipse installation.
Eclipse will remember the last Editor you used to open a file and use this Editor again the next time you open the file.
In Eclipse you can create templates for code snippets. This code
snippets can be activated via
autocomplete (Ctrl+Space).
For example, assume that you are frequently creating
To create a template for this, select the menu → → → → .
Press the New button. Create the template shown in the following screenshot.
In this example the name npm is your keyword for code completion.
Now every time you type npm in the Java editor and press Ctrl+Space the system will allow you to replace your keyword with your template.
For example, assume that you are frequently creating
public void name(){}
methods. You could define a template which creates the
method body
for
you.
To create a template for this, select the menu → → → → .
Press the New button. Create the template shown in the following screenshot.
${cursor}
indicates
that the cursor should be placed at this
position after
applying the
template.
In this example the name npm is your keyword for code completion.
Now every time you type npm in the Java editor and press Ctrl+Space the system will allow you to replace your keyword with your template.
Eclipse can generate source code automatically. In several
cases comments are added to the source code.
Select → → → → to change the code generation templates.
In the code tree you have the templates. Select for example → and press the Edit button to edit this template and to remove the "todo" comment.
Select → → → → to change the code generation templates.
In the code tree you have the templates. Select for example → and press the Edit button to edit this template and to remove the "todo" comment.
The Eclipse IDE allows you to organize your project into
workspaces so
that you can hide certain resources. You can also place
markers in the
code which you can later access via the
Task
view.
You will create more and more projects in your development
career. Therefore the data in your
workspace
grows
and it is hard to
find the right information.
You can use working sets to organize your displayed projects / data. To set up your working set select the → →
Press on the following dialog to create a working set.
On the next dialog select Resource, press the button and select the projects you would like to see and give it a name.
You can now filter the displayed files in the Package Explorer based on the created working set.
You can use working sets to organize your displayed projects / data. To set up your working set select the → →
Press on the following dialog to create a working set.
On the next dialog select Resource, press the button and select the projects you would like to see and give it a name.
You can now filter the displayed files in the Package Explorer based on the created working set.
You can use
This indicates a task for Eclipse. You find those in the Task view of Eclipse. Via double-clicking on the task you can navigate to the corresponding code.
You can open this view via → → .
For example, add a TODO to your
Close the editor for the
A more advanced tasks management system is available with the Mylyn plug-in.
// TODO
comments in your code to add task reminders.
This indicates a task for Eclipse. You find those in the Task view of Eclipse. Via double-clicking on the task you can navigate to the corresponding code.
You can open this view via → → .
For example, add a TODO to your
MyFirstClass
class to see it in the Tasks
view.
package de.vogella.eclipse.ide.first; public class MyFirstClass { private static final String HELLO = "Hello Eclipse!"; public static void main(String[] args) { // TODO Provide user interface System.out.println(HELLO); int sum = 0; sum = calculateSum(sum); System.out.println(sum); } private static int calculateSum(int sum) { for (int i = 0; i <= 100; i++) { sum += i; } return sum; } }
Close the editor for the
MyFirstClass
class. If you now double-click on the
tasks, the Java editor opens
again and
the TODO comment is selected.
A more advanced tasks management system is available with the Mylyn plug-in.
Eclipse allows that certain behavior is configured via startup
parameters. This requires that you start Eclipse from the command
line or that you configure your launcher links so that these
parameters are considered.
The following parameters are relevant for
the Workspace.
For example if you want to start Eclipse under Microsoft Windows using the
Depending on your platform you may have to put the path name into double quotes.
Table 2. Workspace Startup Parameters
Parameter | Description |
---|---|
-data workspace_path | Predefine the Eclipse workspace. |
-showLocation | Configures Eclipse so that is shows the current workspace directory in the title of Eclipse. |
For example if you want to start Eclipse under Microsoft Windows using the
c:\temp
directory as
workspace
you can use the following command
from the
command line.
c:\eclipse.exe -data "c:\temp"
Depending on your platform you may have to put the path name into double quotes.
Your Eclipse installation contains a file called
The Eclipse specific runtime parameter are described under the following URL:
http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html
eclipse.ini
which can be used to set parameters for your Eclipse IDE and your
Java virtual machine. For example
the
-Xmx
parameter can be used to define how large the Java heap size can can
get.
-Xms
defines the initial heap size of the Java virtual machine.
The Eclipse specific runtime parameter are described under the following URL:
http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html
You can specify default values for preferences via file which is
typically called
This file you can setup default values for preference settings. For example the following will setup a default type filter for the
You link to this file via your eclipse.ini file in your Eclipse installation directory. The following assumes that you created the
Only the
To identify additional preference settings you can use the following approach:
Note that you need
to remove the scope (e.g. /instance/) before
copying
it into the
plug_customization.ini
.
This file you can setup default values for preference settings. For example the following will setup a default type filter for the
java.awt
and
javax.swing
package.
org.eclipse.jdt.ui/org.eclipse.jdt.ui.typefilter.enabled=java.awt.*;javax.swing.*;
You link to this file via your eclipse.ini file in your Eclipse installation directory. The following assumes that you created the
plug_customization.ini
file in the Eclipse installation directory.
-pluginCustomization plugin_customization.ini -startup plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120522-1813 -product org.eclipse.epp.package.rcp.product --launcher.defaultAction openFile -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Dosgi.requiredJavaVersion=1.5 -Dhelp.lucene.tokenizer=standard -XX:MaxPermSize=256m -Xms40m -Xmx512m
Only the
-pluginCustomization plugin_customization.ini
parameter was added to the default
eclipse.ini
file.
To identify additional preference settings you can use the following approach:
-
start a new workspace
-
change the preference
-
export all
preferences
-
search the key in the exported file
plug_customization.ini
file.
The Eclipse help system is available from within your Eclipse
installation as well as online.
With your running Eclipse IDE you can access the online help via → . This will start a new window which shows you the help topics for your currently installed components.
Online you find the online help under http://www.eclipse.org/documentation/. The online help is version dependent and contains the help for all Eclipse projects included in the selected release.
With your running Eclipse IDE you can access the online help via → . This will start a new window which shows you the help topics for your currently installed components.
Online you find the online help under http://www.eclipse.org/documentation/. The online help is version dependent and contains the help for all Eclipse projects included in the selected release.
The Eclipse homepage also contains a list of relevant resources
about
Eclipse and Eclipse programming. You find these resources under
http://www.eclipse.org/resources/.
You also find several tutorials about the Eclipse IDE on the following webpage: http://www.vogella.com/eclipse.html.
You also find several tutorials about the Eclipse IDE on the following webpage: http://www.vogella.com/eclipse.html.
Due to the complexity and extensibility of Eclipse you will
need
additional resources to help you resolve your specific
problems.
Fortunately the web contains several resources which can help
you
with
your Eclipse problems.
Currently the best places to ask questions are the Eclipse forums and Stack Overflow.
The Eclipse forums can be found under the following URL: http://eclipse.org/forums
Stack Overflow can be found under the following URL: http://stackoverflow.com
The Eclipse forums offer several topic specific forums in which you can post and answer questions. To post questions in the Eclipse forums you need a valid user account in the Eclipse bugtracker. The advantage of the Eclipse forums is that, depending on the topic, Eclipse committers are also active there and might directly answer your question.
Stack Overflow also requires a user account and its community is also very active. Stack Overflow does not have separate forums for specific questions. In Stack Overflow you tag your questions with the relevant keyword, e.g. Eclipse and people search for them or subscribe to them.
Both places are excellent places to ask questions. If you ask a question it is in general good advice to be polite and to give a good error description as this motivates people to give you high quality answers.
Currently the best places to ask questions are the Eclipse forums and Stack Overflow.
The Eclipse forums can be found under the following URL: http://eclipse.org/forums
Stack Overflow can be found under the following URL: http://stackoverflow.com
The Eclipse forums offer several topic specific forums in which you can post and answer questions. To post questions in the Eclipse forums you need a valid user account in the Eclipse bugtracker. The advantage of the Eclipse forums is that, depending on the topic, Eclipse committers are also active there and might directly answer your question.
Stack Overflow also requires a user account and its community is also very active. Stack Overflow does not have separate forums for specific questions. In Stack Overflow you tag your questions with the relevant keyword, e.g. Eclipse and people search for them or subscribe to them.
Both places are excellent places to ask questions. If you ask a question it is in general good advice to be polite and to give a good error description as this motivates people to give you high quality answers.
Eclipse has a public bug tracker based on
Bugzilla.
Bugzilla
is an Open Source project.
This bugtracker can be found under https://bugs.eclipse.org/bugs/. Here you can search for existing bugs and review them.
To participate actively in the Eclipse bugtracker you need to create a new account. This can be done by pressing the Open a New Account link.
Once you have a user account, you can login to the Eclipse bugtracker. This allows you to comment on existing bugs and report new ones.
This bugtracker can be found under https://bugs.eclipse.org/bugs/. Here you can search for existing bugs and review them.
To participate actively in the Eclipse bugtracker you need to create a new account. This can be done by pressing the Open a New Account link.
Once you have a user account, you can login to the Eclipse bugtracker. This allows you to comment on existing bugs and report new ones.
To learn how to debug Eclipse Java programs you can use
Eclipse Debugging
To learn Java Web development you can use with Servlet and JSP development . If you want to develop rich stand-alone Java clients you can use Eclipse RCP You can extend Eclipse with Eclipse Plug-ins .
Good luck in your journey of learning Java!
To learn Java Web development you can use with Servlet and JSP development . If you want to develop rich stand-alone Java clients you can use Eclipse RCP You can extend Eclipse with Eclipse Plug-ins .
Good luck in your journey of learning Java!
Before posting questions, please see the
vogella FAQ. If you have questions or find an error in this article please
use the
www.vogella.com Google Group. I have created a short list
how to create good questions
which might also help you.
No comments:
Post a Comment