0000 - Getting Started
What’s the Point?
-
Install the tools you need to create Java programs
Our goal is to learn the fundamentals of object-oriented programming using the Java programming language. You might not even know what those things mean yet, but to get started you’ll need a couple of things installed on your computer.
- Java Development Kit (JDK)
-
A collection of software, used to develop Java programs. Most importantly, it includes a compiler.
- Integrated Development Environment (IDE)
-
An application used to write and test source code.
These two tools can be used on pretty much any laptop or desktop computer, even if it’s not very powerful.
The Canvas course includes some options for students who don’t have a computer capable of running the necessary software.
Install the Java Development Kit
I recommend installing the JDK available at https://adoptium.net, and the Oracle JDK is another great option. The linked documents below provide detailed installation instructions—but if they are outdated at the moment, there are about a gazillion web pages and Youtube videos that will show you the process. I recommend installing the JDK before installing your IDE.
Install an IDE
A computer program is created by writing source code, which is just text and can be created using any text editor. However, developing programs with something like Notepad or TextEdit—which come with Windows and macOS, respectively—means going through some potentially confusing (or at least intimidating) steps each time you want to run your program. Though IDEs do much more, the most important thing they do for beginners is give you a "run" button you can press whenever you want to test your code.
You can definitely write Java programs without using an IDE, but it’s kinda like getting engaged to someone you’ve only ever met online: just because it turns out okay for some people doesn’t mean it’s a good idea for you. The only people who should write code without an IDE already know too much about programming to be wasting their time reading this book.
There are many great IDEs out there, including many free options, and ultimately it doesn’t matter which one you use: they all produce the same files, and a person looking at the files can’t tell what IDE you used. It’s like choosing between Word and Google Docs; each has strengths and weaknesses, but you can write romantic poems about your online fiancé (or fiancée) in either one.
I primarily use Visual Studio Code ("VS Code"), so that’s what you’ll see in most of my videos. It’s completely free and is available for Windows, macOS, and Linux. You can download it at https://code.visualstudio.com, and the videos below walk through installing VS Code and the tools it needs for Java development. I recommend installing a JDK (see previous section) prior to installing an IDE.
Once you’ve installed the JDK above, install the IDE you are going to use to learn Java. There’s nothing wrong with trying out multiple IDEs to find out which one you prefer. Other popular options include eclipse, IntelliJ IDEA, and Apache NetBeans, and they all have free versions that are great for learning Java.
But my recommendation is to install VS Code.
Once you’ve installed the JDK and VS Code (along with the Java extensions), you’re ready to create your first program.
Check Yourself Before You Wreck Yourself (on the assignments)
Can you answer these questions?
Sample answers provided in Stuff That’s Tacked On The End.