Development environment
On this page 8 topics
Overview
Topics
- OS basics
- installing the JDK
- IntelliJ IDEA
- VS Code
- file extensions
- environment variables
- PATH
Learn first
90 min of reading · 2 h of practice (estimate)
Learning outcomes
- Install the baseline JDK and confirm the installation with
java -versionandjavac -version. - Install IntelliJ IDEA and create, run, and close a project.
- Explain environment variables and
PATH, and fix a "command not found" error caused by a missingPATHentry. - Show hidden file extensions and explain why
.javavs.java.txtmatters.
Lessons
- 01Files, folders, and extensions on Windows, macOS, and Linux16 min read
- 02Installing the JDK (all three operating systems)14 min read
- 03Environment variables and PATH16 min read
- 04Installing and tour of IntelliJ IDEA15 min read
- 05VS Code as an alternative14 min read
- 06Demo: installing the JDK and fixing a broken PATH15 min read
Lab and exercises
Lab
BEG-005-LAB1 · Working toolbox
Outcomes: 1, 2, 3, 4 · Time: ~2 h
- Install the JDK and IntelliJ IDEA.
- Print
java -versionandjavac -versionin a terminal. - Break
PATHin a new terminal session and observe the error. - Restore
PATHand show it works.
Acceptance: screenshots of both states and the fix.
Exercises
| ID | Outcome | Task |
|---|---|---|
| BEG-005-EX01 | 4 | Turn on file extensions and show .java and .txt files side by side. |
| BEG-005-EX02 | 4 | Why does Hello.java.txt not compile as Java? |
| BEG-005-EX03 | 1 | Print the Java and compiler versions. |
| BEG-005-EX04 | 3 | Print your PATH and find the JDK folder in it. |
| BEG-005-EX05 | 3 | You get "command not found" for java. List two possible causes. |
| BEG-005-EX06 | 2 | Create a project in IntelliJ, run it, and close it. |
Show solutions
- EX01 Windows: File Explorer → View → File name extensions. macOS: Finder preferences.
- EX02 Its real extension is
.txt, so it is treated as plain text. - EX03
java -versionandjavac -version; both print versions. - EX04 Windows:
echo %PATH%; Bash:echo $PATH; PowerShell:$env:PATH. - EX05 JDK not installed, or its
binfolder not onPATH; or the terminal was opened before the change. - EX06 New Project → JDK → add a class with
main→ Run → File → Close Project.
Quiz
Outcomes: O1 install JDK · O2 IntelliJ · O3 PATH · O4 extensions.
A self-check for you: nothing is graded, saved or sent anywhere. Choose an answer, then check it. You can try again as often as you like.
Practical part
Practical check: both version commands print, and a new project runs in the IDE. Pass: both done without help.
Common mistakes
Installing a JRE instead of a JDK; multiple JDKs with the wrong one first on PATH; editing PATH and not opening a new terminal.
Assessment
Practical check: versions printed and a new project runs in the IDE.
Career relevance
Every lab depends on it; environment differences return in JNR-054.