Setup Lesson 1
Java and IntelliJ
Author: Brandon Fajardo (4/6/17). Updated (3/5/19)
Introduction
This is the very beginning of learning to code in Java. You can follow along with these notes as you learn.
Lesson topic: To begin, we will set up the programs you will use to code in Java.
Topic 1 - Programs We Need for Coding
In general, when we run code in any programming language, we most likely need two programs:
A runtime environment
A software development kit (SDK)
1.) Runtime environment - A runtime environment is the program that runs software which is coded in a specific language.
For example, Java is a runtime environment that allows you to run software that needs Java.
2.) Software development kit (SDK) - The software development kit (SDK) is the program which allows us to write code ourselves.
The average internet user would not need the Java SDK. Only programmers would need to download it.
Topic 2 - Java
You most likely already know what Java is. Java is used for many things programs online such as video games (Minecraft).
When we code in Java, we need to download two Java-related programs. These are called:
The Java runtime environment (JRE)
The Java development kit (JDK)
As you may have noticed, these are the same programs mentioned above. In this case, they are just specified for the Java programming language.
Subtopic 1 - JRE
You most likely already have Java on your computer. It is best to make sure you have the latest version. This should be available at this link: www.java.com/en/download/ It should also be easy to search for it online.
Subtopic 2 - JDK
The second program we need is the JDK. This is the program that allows you to code in Java. Here is the link: https://www.oracle.com/technetwork/java/javase/downloads/index.html Feel free to look it up yourself as well.
Choose the latest version, as it will be the most advanced and the least susceptible to bugs. Download the version based on your operating system (Windows, Mac, Linux).
*Check if your system is 64 bit or 84 bit in your computer settings.
Run it to install it. The location of this on your computer should be under Program File/Java. It will likely be named “jdk-” with the version number afterward.
Topic 3 - Using an IDE
We still need one more thing, a place to write all of our code. There are many places where you are able to write code. For example, we are capable of writing Java code inside a text document on our computer. We will use an integrated development environment (IDE).
An integrated development environment (IDE) is a program which allows us to write all of our code in one place. IDEs are good because they are designed to check to see if the code we have written is legitimate. They also provide a way to test our code to see if it works.
In this case, we will use the Java IDE, IntelliJ.
Subtopic 1 - IntelliJ
IntelliJ is an IDE created by JetBrains. JetBrains also owns many other IDEs for other programming languages such as: Python, JavaScript, C/C++, Ruby, and iOS/macOS.
Now, we will download IntelliJ.
Here is the link: https://www.jetbrains.com/idea/
We will use the free, community version.
At this point, you may want to create a folder on your computer to keep all your programming files. I placed my download under a folder named “Programming.”
*It defaults to place IntelliJ into your Program Files folder on your computer which is also fine.
Next, we will run it to install it.
Consider using the dark of light theme or making a desktop shortcut. Otherwise, leave the other technical specifications as they are.
Tips
Windows:
It will ask to create a Start Menu Folder. You can just leave this alone. It will create one under the default name “JetBrains”.
Conclusion
Recap: At this point, you have all the programs you will need for coding in Java.
Next: You will begin to explore IntelliJ and create a project and class.
Last updated