Skip to content
Ameen Abozaid
BEG-005

Development environment

  • 6 Lessons
  • 90 min of reading
  • 2 h practice (estimate)
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

  1. Install the baseline JDK and confirm the installation with java -version and javac -version.
  2. Install IntelliJ IDEA and create, run, and close a project.
  3. Explain environment variables and PATH, and fix a "command not found" error caused by a missing PATH entry.
  4. Show hidden file extensions and explain why .java vs .java.txt matters.

Lessons

  1. 01Files, folders, and extensions on Windows, macOS, and Linux16 min read
  2. 02Installing the JDK (all three operating systems)14 min read
  3. 03Environment variables and PATH16 min read
  4. 04Installing and tour of IntelliJ IDEA15 min read
  5. 05VS Code as an alternative14 min read
  6. 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

  1. Install the JDK and IntelliJ IDEA.
  2. Print java -version and javac -version in a terminal.
  3. Break PATH in a new terminal session and observe the error.
  4. Restore PATH and show it works.

Acceptance: screenshots of both states and the fix.

Exercises

IDOutcomeTask
BEG-005-EX014Turn on file extensions and show .java and .txt files side by side.
BEG-005-EX024Why does Hello.java.txt not compile as Java?
BEG-005-EX031Print the Java and compiler versions.
BEG-005-EX043Print your PATH and find the JDK folder in it.
BEG-005-EX053You get "command not found" for java. List two possible causes.
BEG-005-EX062Create 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 -version and javac -version; both print versions.
  • EX04 Windows: echo %PATH%; Bash: echo $PATH; PowerShell: $env:PATH.
  • EX05 JDK not installed, or its bin folder not on PATH; 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.

  1. 1To compile Java you need the:O1
  2. 2Which command checks the compiler?O1
  3. 3An IDE is:O2
  4. 4Where is a program's output shown in IntelliJ?O2
  5. 5PATH is:O3
  6. 6After editing PATH, you must:O3
  7. 7"Command not found" for java most likely means:O3
  8. 8Why show file extensions?O4
  9. 9Hello.java.txt is really a:O4
  10. 10JAVA_HOME usually holds:O3

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.

Type to search levels, phases, modules and lessons.