Getting Started
There are a lot of ways to "get set up" to run Java code.
For at least the first chunk of this, you should be able to get away with using the editor on https://run.mccue.dev. That might be the easiest.
I will add tutorials here as they are requested or as I have time, but for the start all that matters is that you have the ability to run and edit the following code.
void main() {
System.out.println("Hello, World");
}
Windows
Download the "JDK MSI" from adoptium.net.
Run the installer, selecting all the default options.
Mac OS
Download the "JDK .pkg" from adoptium.net.
Run the installer, selecting all the default options.
Linux
Linux is a little annoying. If you are using it you are likely used to it by now, but you can use adoptium.net like everyone else, but there is no universal installer there.
You can either download the .tar.gz
file that matches your machine, extract it,
and add the bin
folder to your PATH
, or you can try to find an installer for your
specific linux distribution.
repl.it
replit.com is a pretty common choice for teachers because they will be able to give you assignments and have you share back your results. It is also a decent option if your school only provides you with Chromebooks or similar.
It requires an internet connection and you will have to make an account, but otherwise it is fairly convenient.
If you are in school and your teacher has helped you get set up in some other way it is okay to skip this section and just do it the way you were shown.
Step 1. Make an account
Go to replit.com and find the "Sign Up" button. Websites change every now and then so these screenshots might be out of date.
Click it and sign up for an account.
Step 2. Create a Java REPL
Find the "Create REPL" button and click it.
Then you should be presented with a menu that lets you search for the type of REPL to create. Find the Java template and click "Create".
Step 3. Run code
You should land on a screen with a big green run button, an open file called "Main.java", and a blank window labeled "console".
Click that run button, and you should see the text Hello, world!
appear under the console window.