On Command Prompt I see the following
C:\Users\lek-h\Downloads\OOP>javac Example.java
C:\Users\lek-h\Downloads\OOP>
(i.e., no response from Command Prompt)
Java file
Under the following C:\Users\lek-h\Downloads\OOP\Example.java I have
class Example {
// A Java program begins with a call to main().
public static void main(String args[]) {
System.out.println("Java drives the Web.");
}
}
I have jdk 17 installed and set as path in system.
Under my system variables, I have
System variable JAVA_HOME
with value C:\Program Files\Java\jdk-17
System variable JAVA_PATH
with value C:\Program Files\Java\jdk-17
Under user variables I have
Variable Path
with one value being %JAVA_HOME%\bin