- This course is accompanied by exercise files that you can use to follow along with the demonstrations. I've copied the exercise files to my desktop, but you can place them anywhere on your hard disk. The exercise files are organized by chapter. Within each chapter, you'll find a number of subfolders, one for each video for which there's a live demonstration. For those videos where I'm only showing slides, there is no subfolder. Within the subfolder for that video, you'll find a project folder.
And, for most of these folders, there's a source folder under that, and under that, a series of java package folders. You'll find the actual java code under com, example, java. And, as you'll learn in the course, that's the equivalent folder structure to a java package, a concept that's used to organize java code. These projects are designed to be imported into IntelliJ IDEA. I'll show you how to do that using the most recent version of IntelliJ IDEA community edition, Version 14.1.3.
From the welcome screen, I'll click on import project. Then, I'll navigate to my Exercise Files folder to the Chapter folder, and to the subfolder for that video. Then, I'll choose the actual project folder. Make sure that you don't choose any of the parent folders above this; this is the folder that you want to import. Notice that it has a source folder underneath it. That's what marks it. I'll click OK. Then I'll see a series of dialogues. On the first dialogue, accept the default to create the project from existing sources.
And click Next, and then you can accept the project name. If you prefer to change the location, you can do that at this point, but I recommend keeping it the same. On the next screen, IntelliJ IDEA tells you that it's found your source files under the SRC folder, that's the standard location for IntelliJ IDEA projects. Keep on clicking Next until you get to this screen, and click Finish. And that imports the project and creates a number of other files and folders that you'll need.
You can then open the project from the project window, and you'll find the source folder there. And you'll see that the package directory structure has been flattened, so it's shown as just a package. And from there, finally, you can open the java code. From here, if you want to get back to your folder in Finder or Explorer, you can right click on the project and then choose Show in Explorer on Windows, or Show in Finder on Mac. And that'll take you back to the exact same place.
Notice that there's now a file with the .iml extension, and a folder named .idea. On Windows you'll see this folder clearly, while on Mac, it'll probably be hidden. I'll go back to this step and I'll run the application for the first time. The first time you want to run the code, you'll need to make sure you've opened the main class. That's the class that has the main method in it. And then click into that class. Then go to the menu and choose Run, and then Run again.
Choose the item with the class name and click it, and that should run the class for the first time. That creates something called an edit configuration. From there, you can run by going to the menu and choosing Run, Main, or, as I'll show you later, there's a toolbar that has a number of icons, and you can click this Run button. But, again, you can only do that after you've run the application for the first time. So that's how to use the exercise files in IntelliJ IDEA.
It's also possible to open these exercise files in Eclipse, although I won't be using Eclipse during the course. For example, I'll go to my Exercise Files folder, to 04_05, and I'll use this project, Math. Now, I'm going to copy the location of this folder to my clipboard, and in Windows that's easy to do. You just click on the folder icon, and then copy the string that appears. Then I'll go back to Eclipse, and I'll say File, New, Java Project.
I'll set the name of the project to Math, then I'll uncheck the option to use the default location, and I'll paste in the location of the project. I'll make sure that I'm pointing to the actual project folder, and not to its parent folder. Then, I'll just click Finish. Eclipse, just like IntelliJ IDEA, assumes that your source files are in an SRC sub folder, and from there, you can open your files and do whatever you need to do. So that's a look at how to use the exercise files in both IntelliJ IDEA, which I'll be using throughout the course, and in Eclipse.
Author
Updated
9/30/2020Released
7/24/2015- Understanding the history and principles of Java
- Installing Java, IntelliJ IDEA, and BlueJ
- Creating a Java project
- Working with variables, values, and expressions
- Working with object data types
- Building, comparing, and parsing strings
- Debugging and exception handling
- Creating loops and reusable code
- Passing arguments by reference or value
- Using simple and complex arrays
- Creating custom classes
- Understanding inheritance and polymorphism
- Managing files with Java libraries
- Documenting code with Javadoc
- Packaging classes in JAR files
Skill Level Beginner
Duration
Views
Related Courses
-
Java Essential Training for Students
with Peggy Fisher3h 6m Intermediate
-
Introduction
-
Welcome59s
-
Is this course for you?3m 22s
-
Using the exercise files5m 5s
-
-
1. What Is Java?
-
The history of Java5m 57s
-
Java syntax and compilation5m 26s
-
-
2. Installing the Software
-
Installing Java on Windows3m 49s
-
Installing Java on OS X2m 50s
-
Installing BlueJ1m 52s
-
-
3. Getting Started
-
Hello World5m 44s
-
-
4. Working with Variables
-
Converting numeric values5m 37s
-
Using Java operators6m 11s
-
5. Working with Objects
-
Using the String class5m 5s
-
Comparing string values5m 51s
-
Parsing string values3m 13s
-
Working with dates and times8m 35s
-
6. Exception Handling and Debugging
-
Debugging with IntelliJ IDEA5m 18s
-
Throwing custom exceptions3m 19s
-
7. Managing Program Flow
-
Using the switch statement4m 51s
-
Creating looping code blocks5m 23s
-
8. Using Data Collections
-
Using simple arrays6m 32s
-
Using two-dimensional arrays4m 17s
-
-
9. Creating Custom Classes
-
Understanding encapsulation7m 19s
-
Using constructor methods4m 56s
-
-
10. Working with Inheritance
-
11. Using Common Java Libraries
-
12. Preparing a Java Application for Deployment
-
Conclusion
-
Next steps1m 37s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Using the exercise files