Editor, terminal and classpath basics
What you will learn
An editor lets you write source code; a terminal lets you invoke tools. An IDE combines editing, compilation, navigation and debugging. All three are interfaces to a development workflow, not different Java languages.
public class Main { public static void main(String[] args) { System.out.println("Catalog project"); }}Expected output:
Catalog projectThis output identifies the intended example, independent of which editor created it.
How it works
Keep a dedicated project directory with Main.java. Use the explicit command java -cp . Main after compilation from that directory. The classpath specifies where Java looks for ordinary classes and libraries. Later projects add packages and build tools; for now, avoid copying generated files between unrelated projects.
public class Main { public static void main(String[] args) { System.out.println("Catalog version 2"); }}Expected output:
Catalog version 2A recognizable output helps confirm which class is being launched.
Common mistakes
An IDE may compile to a separate output directory. Running from a different terminal folder may find a stale class or no class. Inspect the selected working directory and classpath.
Try it yourself
Create an isolated folder with one Main.java, compile it, then explain why a terminal in another folder may not find Main.
These are local Java practice tasks, not automatically graded ByteMind exercises. Use a patched JDK; no network or third-party dependency is needed.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Editor, terminal and classpath basics — knowledge check
Check your understanding of editor, terminal and classpath basics.
What is the role of an editor?
What should you check if the launcher cannot find Main?