This course will be retired on July 14, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Introducing IntelliJ and Unpacking Packages!
You have completed Introducing IntelliJ and Unpacking Packages!
Preview
In this video we'll create our very first project using IntelliJ IDEA.
IntelliJ IDEA
- Link to download - pick the 'Community' version
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
[MUSIC]
0:00
So far, we've done all of our
learning in work spaces and
0:09
run all of our programs by typing
commands into the console.
0:13
These days instead of using the console
most programming is done using
0:17
an integrated development environment,
or IDE.
0:22
You can think of an IDE as basically
the Microsoft Word of writing code.
0:25
It underlines misspellings, highlights
errors, and even has auto-complete.
0:30
But most of all it just makes
programming a lot easier.
0:35
One popular IDE for Java is IntelliJ IDEA,
0:40
which we'll be using in this course and
you should start using going forward.
0:44
If you don't already have it,
take a minute to download it.
0:48
There is a link below
in the teacher's notes.
0:51
Once you've got IntelliJ,
there's just a few steps to set it up.
0:54
Let's pick Do not import settings,
then hit OK.
0:58
Then let's go to the bottom, and click
Accept to agree to the Privacy Policy.
1:02
Then on the Data Sharing screen,
1:09
you can either send them your usage
statistics or you can not send them.
1:11
I'll choose to send them.
1:16
Finally, we need to pick a theme.
1:18
I'll pick the light theme, but you
are free to choose whatever you'd like.
1:20
Then let's click Skip Remaining and
Set Defaults.
1:24
Nice, we are all setup and
ready to create our first project.
1:27
Let's get started with
the Create New Project button,
1:31
which helps us configure a project.
1:35
On the first screen we need to pick
which type of project we are making.
1:37
It's already set to Java, which is good.
1:41
But it looks like we're missing an SDK,
which is not so good.
1:44
SDK stands for
Software Development Kit, and
1:49
it's a set of files that defines
what something is and how it works.
1:53
In our Microsoft Word example,
an SDK will be kind of like a dictionary.
1:58
It defines what words are allowed and
2:02
tells us how those words can
be combined to make sentences.
2:05
In the Java world, instead of an SDK,
2:09
we have the JDK, or Java Development Kit.
2:12
And luckily, IntelliJ is nice
enough to include a download link.
2:16
Let's click that, and
then on the web page,
2:21
click the Download button at the top.
2:23
Then, click Accept License Agreement and
download the JDK for
2:29
your operating system.
2:34
So for me, I'll pick Mac OS.
2:36
Once the JDK is downloaded,
you'll need to install it.
2:41
I'll double click on the icon.
2:47
Which brings me to the installer,
2:52
click Continue, pick Install.
2:56
Now I'll need to put
in the admin password.
3:00
And now we've got the JDK.
3:07
Now that we've got the JDK, we just
need to tell IntelliJ where to find it.
3:10
Alternatively, we can just hit Cancel and
3:14
then Create a New Project, and
IntelliJ will find it for us.
3:19
Let's click Next, And
3:24
then choose to create the project
using the Command Line App template.
3:28
This template gives us a simple Java
application with a main method,
3:33
just like we're used to.
3:37
Let's hit Next again, and
then give our project a name.
3:38
Let's go with MyFirstProject and
move onto the Project location.
3:43
This is where the project will
be stored on your computer.
3:50
By default all projects will be
stored inside of a folder named after
3:53
the project.
3:58
And that folder will be stored
in the IdeaProjects folder.
3:59
Though you can change where a project is
stored, by either typing a new location,
4:03
or clicking the three dots on the right.
4:07
The last thing we need to do,
is set the package name.
4:12
Typically, this would be
the reverse of your company's URL.
4:15
So for me,
that would be com.teamtreehouse.
4:19
Though the package name isn't super
important unless you plan on publishing
4:25
your app.
4:29
So for now let's all just use the same
package name com.teamtreehouse.
4:31
Finally, let's click finish and
IntelliJ will create the project.
4:37
And if the directory doesn't exist,
it'll create that too.
4:41
In the next video, we'll see what
was created and run our new project.
4:47
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up