This is an important lesson and we will look at how we can configure multiple Geordie's and play with 2
them and also we look at Eclipse's completion process. 3
First thing is let's just go ahead and create an interface within our eclipse package. 4
So let's just right click say new and create an interface earlier we created a class. 5
Let's just name it as best I finish. 6
Let's add a default method here 7
and it's just formatted. 8
So if you recall from our coding conventions class the command for that is control shift and that called 9
automatically formatted. 10
So that's an that's an interface. 11
Now let's just say that we are working for a company on the team itself is using an older version of 12
July. 13
Let's say it's using Java 6. 14
But here we have we are you know we just created a default method which is which has been introduced 15
only in July 8 so we may be forced to use our older version. 16
So let's just go ahead and let's just assume that this is some test package that we create or destroy 17
best. 18
So let's now try to install. 19
Let's just say we want to write some real code for the company and we have to use a JDK motion like 20
6 or something like that. 21
So let's just go ahead and do that. 22
How is that going to window. 23
References here. 24
And but for instance you have this option Jawa that's good doc and here that is this thing called us 25
unstarted GEORGIS. 26
Right now the latest version has been installed and that's what we were using here in the Eclipse's 27
package. 28
So that's the one which has which is which is which is also being used to launch eclipse etc.. 29
OK so let's just add a new one that's Greek on here. 30
Is jihadi type it's just send next and let's select one from the disk. 31
So 32
the program files Jawa. 33
And it's just big geodesics. 34
That's. 35
OK. 36
OK. 37
Now let's just finish. 38
So this has been added sort of. 39
This is intense. 40
It's just and I. 41
So that was installed Geordie's option within Java. 42
So that's the JRD for running our programs now for compiling. 43
Also we need to eclipse that we want to use a comprehensive level of 1.6 so we want to compile our stuff 44
. 45
But that version 1.6. 46
No why are we doing this. 47
That's because eclipse actually internally it uses a different compiler not the regular Jela jealousy 48
compiler it uses its own compiler called Eclipse compiler for Java. 49
OK so here we are saying that please compile with a ocean 1.6 with a comprehensive level of 1.6 because 50
so we are telling that to two eclipse on that's just hit apply here. 51
Mr.. 52
Yes. 53
OK. 54
But you'll see that here you know it's not showing any compilation at all. 55
Even though we are using Eclipse saw a job while 1.6. 56
So the reason for that is because whatever we have done right now will apply to only future projects 57
. 58
OK. 59
The projects that get created from here onwards. 60
OK not to the existing one. 61
So for the existing one there is already some settings and we need to or we need to change that. 62
So let's just go ahead and create a new package new job project and let's just collect us best. 63
Now you can see that it is using an execution environment of 1.6 and it's sad next. 64
And here is the settings on which in the library we are using the 1.6 once again as I mentioned earlier 65
. 66
That's next. 67
And let's also go ahead and create the same interface now. 68
So let's just it can do it from file or we can also create created here in New interface. 69
It's just have the same name 70
as you can see now it is giving us a compilation error. 71
So it says change project compliance on Jerry to one point because default methods are not accepted 72
here in 1.6. 73
It's just development that are allowed only source level one point eight or able. 74
OK so that's the thing so far this new package. 75
So we have geodesy ironed out with a compiler complient level it was 1.6. 76
So let's just change it for this project also. 77
OK. 78
So let's just right click here and you'll see all the options specific to this project and let's go 79
to this bottom one which is properties we conduct now here there is this thing called a job. 80
But I can explain what that is in a book. 81
So let's go here to libraries. 82
So it's using the library so let's just remove it unless I add a new library so let's head this but 83
and call our library. 84
That's the JRD system nobody. 85
That's the one which we want and let's just use the workspace workspace Geordi. 86
Now if you want an alternate theory you can click this and you can select from here. 87
You know you can set up from here or you can even set a crimp muckraking on this button but it's just 88
we just need to get six months out of this and finish tickler search and apply and it's going to this 89
Java compiler. 90
So this is the compiler settings just for this project that we selected. 91
OK. 92
One point eight now and we need to have it as 1.6 now say apply it says bury the project. 93
OK. 94
Yes. 95
Rebuilding the project and explain what building is. 96
Now you can see that there is a compilation does the right icon is here. 97
Which means that you know we have some issue and that is the default method cannot be different and 98
different methods cannot be used here. 99
OK. 100
So that's it. 101
And now let's go back 102
let's look at what a belt Pattis barely part is. 103
Simply put it's the classpath glass but to walk glass back to the source code that needs to be compiled 104
. 105
It can also include some libraries that the source code depend on. 106
Like in this case by default we have a system library jihadi library which is nothing but the Java library 107
. 108
In addition if you want to add any extra jobs like the Google Google on Apache Commons you can get from 109
here you can get those dot files so that your source code can use them. 110
OK. 111
In addition to the libraries you can also how other projects. 112
Let's say for example other projects in the same workspace that say for example eclipse just is going 113
to use some code for the next project. 114
In that case we can add that project here. 115
So you how inter-dependent projects. 116
And sometimes when you're writing professional aquarter like let's say a large e-commerce application 117
or something like that then you may have multiple components and each component would be a project depending 118
on on that project. 119
For example there can be a project just for credit card processing so you Hylan the code related to 120
credit card processing on other parts other projects in your application can use that code. 121
And so that's how you build inter-dependent projects within the same application and application is 122
represented by the workspace itself. 123
OK. 124
So that's the back. 125
Now why is it called as big bot. 126
Because it is used in something called as a bell process on what is a bell process at Bell process. 127
Simply put it translates your source code into compiled code. 128
So all all this time before we were using Eclipse we were still involved doing this bell process becoming 129
the big process but we were doing it manually we would compile the source code manually which was a 130
very tedious process. 131
We would open the command prompt typing the java command and we would do that. 132
Right. 133
So that was a very tedious process. 134
Now with Eclipse. 135
So that's done automatically it's done by something called us a bit more. 136
OK. 137
So eclipse uses this tool cordless Jawa builder. 138
So that's the barrier to Angela. 139
But basically it's just a class with an eclipse and it uses the eclipse compiler for Java. 140
It's proprietary compiler which which I mentioned earlier along with this belly but I and it uses a 141
compiler to compile all this core undeground basically create declassifies. 142
OK so that's the Java barrier. 143
And then you are working on professional code you would also include other kinds of Belmarsh like mine 144
when are some tools you might be using your T might be using or and some tools like that. 145
OK so those are better tools on Java. 146
Is it by default it uses art to obey it just automatically. 147
So what that means is every time you make a change you make any change in your source code that source 148
code. 149
And if you save it it's instantaneously compiled. 150
OK so that's auto building. 151
And that option is here by default begge automatically and it is done in an incremental way. 152
Which means that if you have a large code base it doesn't mean that every time you make a change it's 153
going to compile all the files. 154
It's not going to happen if it does not it's qualis a full rebuild. 155
It's not going to happen what because it will be very slow. 156
So does it. 157
And it does in a very incremental ways so only the files that are changed are compiled. 158
OK now if ever you want to compile the whole thing if you want to rebuild the entire project you can 159
just go into a project and hit clean and it will ask you whether you want to clean all projects or only 160
the selected Bunson if you want only those allocated ones you can do that if you want all projects to 161
do this. 162
And if you hit OK then what happens is all you are classified on your hard drive they get deleted and 163
then they get recreated once again 164
here if you're going to eclipse. 165
Sorry 166
for me. 167
God Creator you know that this is the new time stamp. 168
So everything got rebuilt just because we have had we have done a rebuild by clicking on Windows and 169
project pallium. 170
OK. 171
So that's what you would do. 172
And you have to do a full rebuild. 173
So that's the bail process and that's about it.