Java 21 - How to install Oracle JDK/OpenJDK on Windows
Вставка
- Опубліковано 8 вер 2024
- In this video, I will show how to install two JDKs: from Oracle and OpenJDK. Check this tutorial to get started using the new features of Java 21.
You can download the JDKs from the following links.
From Oracle:
www.oracle.com...
From OpenJDK:
jdk.java.net/21/
Normally, you can use the JDK (Java Development Kit) with an IDE (Integrated Development Environment) to develop.
To start testing Java, you can type jshell in your command prompt and code a little bit.
Alternatively, the easiest way to start is by creating a simple Java class (using Notepad, for example):
public class Main {
public static void main(String[] args) {
System.out.println("Hello world!!!");
}
}
Save the file as Main.java. Open the file directory in your command prompt and type:
javac Main.java
And finally type,
java Main
You'll have "Hello world!!!" as result. I hope that helps!
Where is the next step?
and how to launch?