Setting Up Java Programming Environments
This lesson explains how to begin the Java course rather than teaching a full programming concept.
Starting the Java Course Here
This lesson is your starting point for learning Java in this course. It does not teach a full programming concept. Instead, it orients you to the learning process: where your code is expected to run, what setup information you will need, and how the course defines a successful first run. Think of it as the map you read before the journey begins. Once you know the map, the later lessons on writing and running Java programs make much more sense.
What This Lesson Is For
The purpose of this lesson is orientation, not instruction in Java syntax or programming techniques. A learner who reads it should come away knowing three things: where code is expected to run, which setup information the course relies on, and what counts as a successful first run. Those three answers shape every lesson that follows, so it is worth reading this one carefully even though it contains no Java code.
What do you think happens?
Will this lesson teach you how to write Java if-statements and loops?
Reveal answer
No, it is an orientation lesson rather than a lesson on Java syntax
The source states that this lesson is an orientation lesson rather than a lesson on Java syntax or programming techniques. Syntax and program creation are taught in later topics.
Finding the Course's Running Instructions
The course provides its own setup instructions, and you should use them to determine where Java code runs and what preparation is required. This lesson does not replace those instructions. It tells you that they exist and that they are the authority for your environment. The exact steps depend on the programming environment you use, so do not assume that a set of steps from another source applies to your course unless the course instructions say so.
The course's own example shows why environment-specific instructions matter. The TextIO class is not a built-in part of Java, so your program must be able to find it. What you need to do depends on your environment. In general, you add the folder named textio to the same folder that contains your main program, because that folder holds the file TextIO.java. The course points to a later section for how to use TextIO.
- The textio folder sits beside the main program, not inside it.
TextIO.javais the file the folder must contain.- This layout is a general picture; your course instructions define the exact steps for your environment.
Orientation Versus Later Lessons
This lesson sits at the beginning of a sequence. The next topic in the course, Building Your First Java Application, covers Java syntax, semantics, pragmatics, creating and running a Java program, and program structure. Those are the lessons where you actually write and run code. A second later topic, also named Setting Up Java Programming Environments, covers approaches to Java development and execution environments in more detail than this orientation lesson does.
What Counts as a Successful First Run
In this course, a successful first run means that the prescribed Java program executes in the intended environment. Two parts of that definition matter. The program is the one the course prescribes, not any program you happen to write or find. And the environment is the one the course intends, which is why the setup instructions come first. Running something that is not the prescribed program, or running it somewhere other than the intended environment, does not meet the course's definition.
The flowchart is a generalized picture of the path. The first two steps come from this lesson's purpose, and the preparation step reflects the course's note that some preparation is required. The check at the end is the course's definition of success. If the check fails, the sensible move is to go back to the setup instructions rather than to guess at a different fix.
Key Term: The JDK
JDK stands for Java Development Kit. It is basic software that supports both compiling and running Java programs. A JDK includes a command-line programming environment as well as a JRE. You need a JDK if you want to compile Java source code, as well as executing precompiled programs.
When you read the course's setup instructions, you will be looking for how your environment provides this kind of software. The orientation lesson does not describe the steps for installing a JDK, so treat the definition as vocabulary you will recognize later rather than as a set of instructions.
Mistakes Beginners Make Here
Common mistake Expecting this lesson to teach Java syntax
What it looks likeLooking for variable declarations or loop examples in the orientation lesson
Why it failsThe source states this is an orientation lesson rather than a lesson on Java syntax or programming techniques.
Do this insteadSave syntax for Building Your First Java Application and treat this lesson as a guide to the course.
Common mistake Guessing the environment setup instead of reading the course instructions
What it looks likeAssuming a folder layout works without checking where the course says code runs
Why it failsThe source says the course-provided setup instructions determine where Java code runs and what preparation is required, and that the steps depend on the environment in use.
Do this insteadFind the course setup instructions first and follow them for your environment.
Common mistake Counting any output as a successful first run
What it looks likeRunning a different program and assuming the first run is done
Why it failsThe course defines success as the prescribed Java program executing in the intended environment.
Do this insteadCheck that the prescribed program runs and that the environment matches the intended one.
Checking Your Orientation
Without looking back at the lesson, write two sentences: one that says where you would look for instructions about running Java code, and one that says what a successful first run means in this course. Then name the later lesson that teaches creating and running a Java program.
Hints
- The course-provided setup instructions are the source for where code runs.
- A successful first run involves the prescribed program and the intended environment.
- The next topic after this orientation lesson is Building Your First Java Application.
Key Takeaways
- This lesson is an orientation to the Java course, not a lesson on Java syntax or programming techniques.
- The course-provided setup instructions determine where Java code runs and what preparation is required, and they depend on your environment.
- Creating and running Java programs is taught in later lessons, beginning with Building Your First Java Application.
- In this course, a successful first run means the prescribed Java program executes in the intended environment.