java --version You should see something like:
For other distros (Fedora, Arch, etc.), use your package manager ( dnf , pacman , etc.) to install openjdk . Open a terminal (Command Prompt on Windows, Terminal on Mac/Linux) and run: installing java jdk
public class HelloWorld public static void main(String[] args) System.out.println("Hello, Java!"); java --version You should see something like: For
javac --version If you see version numbers for both, congratulations — you're ready to write Java! Create a file called HelloWorld.java : Drop a comment below or check out the
Have questions or run into a weird error? Drop a comment below or check out the Eclipse Adoptium community forums.
Java remains one of the most popular programming languages in the world. Whether you're diving into Android development, Spring Boot, or just starting your coding journey, the first real step is installing the Java Development Kit (JDK) .
Compile and run it: