Java Setup 2025
The basic Github Codespaces image has Java built into it. If you are already using a Codespace, skip to the “Check Java” section.
Java Starter Repository
If you already have a codespace, you can skip this section.
To set up a new codespace, find with Github’s blank template and select “Use this template” to open it in a codespace. You can skip all of the configuration options.
Install Code Runner
Code Runner is a simplified way of running programs.
On the left side, find the Extensions (Control-Shift-X), and search for “Code Runner”. Install it. Open the Settings (gear icon). I recommend selecting the following:
- Ignore Selection
- Save All Files Before Run
- Save File Before Run
Check Java
-
Make a new Java file: “New file…” and call it
Practice.java
. -
Include the following text:
public class Practice { public static void main (String[] args) { System.out.println("Yes, this works."); } }
-
Save (Control-S) and run with the Code Runner “Play” icon or Control-Alt-N keyboard shortcut.