-In the rest of this lesson we're going to look at eclipse and - -2
-try to get more familiar with eclipse in a hands on manner - -3
-through a demo. In the demo we will cover some of the - -4
-basic aspects of eclipse like how to run eclipse, how to select - -5
-their workspace, how to create a project, how to create the class - -6
-within the project and so on. I'll also cover some more advanced - -7
-aspects, like how to create builders, run your project within Eclipse, and - -8
-how to use their Eclipse debugger. So let's get to the demo. - -9
-So let's start Eclipse. Eclipse is going to ask me - -10
-for the location of my workspace and in this - -11
-case, I selected a suitable directory and you can - -12
-also use that checkbox on the left to avoid Eclipse - -13
-for asking you again about where to put the - -14
-workspace. And the workspace is basically the place the - -15
-directory. Where, Eclipse will place all of your projects. - -16
-So, now when you start Eclipse, if it's the first - -17
-time you might get this Welcome screen. It's not going to happen - -18
-again on subsequent executions, but I just wanted to make sure - -19
-that I covered all the bases. And so, whatcha want to - -20
-do here is to basically go to the java perspective - -21
-which you can do by clicking over there or you can - -22
-also use the menus. So in this case we will have - -23
-to go to Window, open Perspective, and if the Perspective is - -24
-not here, you'll have to click on Other. And at this point, - -25
-that you can click on Java Perspective, then you - -26
-click okay. And the perspective is basically, the visual work - -27
-space where you will be operating. So, after we selected - -28
-perspective, we can actually close the welcome screen. And here, - -29
-you see that you have this different areas and on - -30
-the left You have the package explorer. This is the - -31
-area where your packages will be, you've got a task list, - -32
-and an outline on the right which we'll cover later. - -33
-And then you have underneath, the bottom, a problems, java - -34
-doc and declaration views and we will see some of - -35
-these views in actions later. And here in the center - -36
-you have the area. Which is called a code editor, - -37
-which is where you'll be writing, editing, and modifying, basically, - -38
-your code. This is where most of the action takes - -39
-place. So let's start by creating a Java project. And - -40
-to do that we can use either the context menu, or - -41
-you can just use the menu, select new Java project. - -42
-You'll be greeted by this, wizard, and. And at this - -43
-point in the wizard, you can select the name of - -44
-your project. I'm just going to call it a very simple way - -45
-my project. And I going to use the default location for - -46
-the project, as you can see it will be placed - -47
-in the work space that I selected before. I'm going to - -48
-also use the default. Java Runtime Environment, which is Java 1.7 - -49
-in this case. I'm going to keep the selected default layout - -50
-and the, then I'm going to go to the next step. Here, - -51
-we're first presented with the location of the source code for - -52
-our project. The default is a directory SRC in my project - -53
-and for the output file, the directory bin. So repeat, we're now - -54
-going to change that. Here in case you need other projects to - -55
-build your own, then you can specify them here. Here we - -56
-are building a simple project, so there's no need for that. - -57
-And here we can specify which libraries our project requires. As - -58
-you can see, the Java library's already specified. And you can - -59
-also add other jars, which can even be External jars. And - -60
-finally this is the tab that allows you to specify which - -61
-part of you project. So how your project will be exported, - -62
-so lets not worry about that for now. Lets click finish. - -63
-And as you can see here on the package explorer, my - -64
-project appeared. So now we can open the project by clicking - -65
-on the triangle right next to it, and as you can - -66
-see there is the SRC directory, where my source code will go, - -67
-and there's also an indication that we're using the JRE, so that's - -68
-the Java system directory within our project. And this is just for people - -69
-who are interested in what happens you know, under the hood. So - -70
-if you don't care about that, you can just skip this part. So - -71
-basically here I'm showing you how we can go to the directory - -72
-where the project was created. We can see the bin and src directories. - -73
-And there's also some other files here that you can - -74
-see these 'dot' files that you will not normally, see. And - -75
-those are kind of bookkeeping files. So these are files that - -76
-contain information about your project and that are created automatically by - -77
-Eclipse. And, for example, will have various indication about the - -78
-configuration of the project, some settings and the class path for - -79
-the project. And, as I said, you don't have to worry - -80
-about this if you just want to go Eclipse as you're never - -81
-going to mess with the command line. -- cgit 1.4.1