By: Jake Bock
Window Managment Tutorial
- One of the most challenging things for novice
programmers when first opening Eclipse are the vast amount of windows that
Eclipse has to offer and the functions these windows are used for.
- In this tutorial, I will demonstrate what the different
windows functions are and where these windows are located in Eclipse.
- The picture above shows you what you will see when you
first open Eclipse.
- Note: You can move any of these windows by clicking and
holding the name of the window and then dragging it to where you want the
window to go.
- To beginning programmers, this can be very
overwhelming, therefore, I will go through the basic windows and how to
get started with a project using these windows.
- The first window I will go over is the Package
Explorer (Pictured Below)
- Note: If you accidentally close a window without meaning to
you can always re-open them by going to Window --> Show View then
choose the window you would like to re-open.
- The above screenshot is the Package Explorer
window (this window is, by default, on the left) which is where your Java
Projects, Packages, and Classes can be viewed.
- To create a new Java Project in the package
Explorer, go to File --> New --> Java Project, name your
project “test” as shown below.
- NOTE: Under the JRE option,
“Use an execution environment JRE:” select the “JavaSE-1.8” JRE which
corresponds to Java Version 8 as shown below.
- You should now see your new project in your Package
- Select JavaSE-1.8 from the JRE Use
an execution environment JRE option when creating the new project.
- When you have made your Java Project in your Package
Explorer Window, the next step will be to make a Package
and a Class.
- To make a Package, you will right-click your
"test" Java Project and go to New --> Package, I will
name my Package "testing".
- After your Package is made, the next step will
be to make a Class.
- To make a Class, right-click "testing"
Package and choose New --> Class, I will name my new Class
- Note: Checkbox the "public static void main(String args)"
box when creating your Class.
- Note: If you choose to make your Class immediately
after you make your Java Project (Skipping the Package step)
your Package will automatically be made with the name "(default
- Your Package Explorer Window should now look
similar to the screenshot below (depending if you used the same names).
- If you noticed when you made a new class, another window
has opened in the middle of your screen.
- This is a new window, called the Editor
- Your Editor should look similar to
the one pictured above if you have the same Java Project, Package,
and Class names.
- This window is where a programmer will type their code
for their program.
- The tab above the window (test1.java) is the Class
- You can have multiple classes in your Java Project!
- For this tutorial, I will make another Class in
the Java Project named "test2" and it will automatically
appear in your Editor (As pictured below).
- To go about doing this, I will make the same steps in
creating my "test1" Class, (Right Click the Java Project,
then, New --> Class).
- As you can see above, there is now a new Class
- You can see this new Class in the Package
Explorer or the Editor.
- The next step in this tutorial is printing a message to
the next window we will go over, the Console.
- In this tutorial, we will print "Hello
World!" to our Console.
- To go about doing this, we will type "System.out.println("Hello World!");" in our Editor.
- In this case, I chose to put my code in the
"test1" Class. (Pictured Below)
- After your "Hello World" code has been
inserted into the Editor, the next step is to run your code.
- To run your code in Eclipse, you can find a shortcut
button (green arrow) toward the top or you can also go to Run -->
Run (shortcut and menu highlighted below)
- After you have ran the "Hello World" code,
you should see your message displayed in the Console.
- Your Console, by default, is displayed
below your Editor (As pictured below)
- Your Console should look very similar to
this, if you used the same "Hello World" code.
- The Console is where your information
will showing up when printing.
- The next window I will be going over in this tutorial
is the Declaration window (pictured below), which is, by
default, directly to the left of the Console window.
- The Declaration window shows the source
of the element selected in the Editor.
- In the screenshot above, I have my cursor on the word
"args", which is why the Declaration
window shows "String args",
because that is the source of that element.
- If I were to put my cursor on something different, such
as the word "main", it would show the source of that element
- The next window I will cover is the Javadoc
window, which, by default, located to the left of the Declaration
- The Javadoc window is an assist window to
the user, telling them what the uses are of the specific word they have
- For example, in the screenshot below, I have
highlighted the word "System" in the Editor
- Even though the screenshot cut out some of the help
text that the Javadoc window provided, you can see that this
window gives you information concerning this word.
- The nest window I will be covering is the Problems
window, which is located to the left of the Javadoc window.
- This window shows you the errors you have in your code
in the Editor.
- For this example, I will make an error in my existing
code. I will remove the quote (") from the line System.out.println("Hello
- Be sure to save your program (Ctrl+s or File->Save) after making
- After this is done, you will notice that the Problems
window has a new entry!
- This is telling the user that there is now an error in
your code and tells you exactly what problem has occurred.
- After you have fixed the error, in our case returned
the quote (") to where it was, the Problems window will
now have no errors.
- The next window I will be covering is the Outline.
- The Outline, by default, is displayed to
the right of the Editor.
- The Outline shows, as you would guess, an
outline of your program.
- In our example, you can see that our Package
(testing) is on top, then the Class (test1), and finally the main
- In the Outline, you can switch classes
and it will show up in the outline.
- In this example, I have switched to my other Class
(test2), as seen below.
- The Outline window can be very useful
when creating long programs because you can find your Methods
easily by clicking the in the Outline.