From the course: Learning Eclipse

Exercise files

From the course: Learning Eclipse

Start my 1-month free trial

Exercise files

- [Instructor] If you have access to the exercise files, you can follow along with the code examples that I'll be working on in this course, just download them and then you'll want to import them. If you look in the Exercise Files folder, you'll see that the folders are numbered by the chapters and the chapter sections. And within those folders are sub-folders for the Begin state and End state. And within each of those are archived files that you can import. So for example, within Eclipse, to import we can go to File, Import. And make sure under the General folder, you choose Existing Projects into Workspace, choose Next, have Select archive file chosen, choose Browse, and then you can navigate to the state that you want. So within the Exercise Files folder, I can go to 0402, go into the End state, and choose Open. And then I'll just want to make sure that all my projects are selected and choose Finish. And then I'll be able to navigate in the folder to my source code and confirm that everything's there. If I wanted to Run to confirm that it runs as expected, I can hit Run, the green button, and sure enough the output is just as I expected. Now if for some reason you have exclamation points here, it might be possible that the import did not work correctly because of you run time environment. But if you followed the videos where I explained the process of installing the JDK, you should be fine. If for some reason you still have issues, well then just go to Project, select Properties, and choose Java Compiler, and confirm that you have the same run time environment that I'm running. And my version currently is 10. And ideally, the later ones should work without any issue, also. But if you need to change it, just uncheck Enable project specific settings, and configure workspace. And now you can go ahead and choose the right version. Now mine is already on 10, but if for some reason yours had 1.3, you'd see that there's a prompt indicating that there might be an issue. Like right over here, it says When selecting 1.3 compliance, make sure to have a compatible Java runtime environment. So we know we want 10. It says here it's currently 10. But if it wasn't and we downloaded version 10, and it was not reflected here, then you can go to Configure and make sure that 10 is selected here. If it was not, you can go to Add, leave it as Standard VM, and just hit Next. And then go to the Directory where you installed Java, and it should be, by default, under your C: drive, Program Files, under Java, and select jre, and click OK. And then you'll see the jar for the runtime environment. And you'll be able to click Finish. Now for me, right now, Finish is shaded out, because as you can see at the top, it says the JRE name is already in use. So I already have the correct run time environment. But if it was incorrect for any reason, this is where you would hit Finish and Apply and Close, Apply and Close, and you should be good to go. And that is about it. Now it seemed a little bit involved, but like I said in the beginning, if you go through the process of installing the JDK the way that I describe, you shouldn't have to go through any of that.

Contents