I\'m trying to execute a Java program from the command line in Windows. Here is my code:
import java.io.File;
import java.io.FileInputStream;
import java.io.
As of Java 9, the JDK includes jshell, a Java REPL.
Assuming the JDK 9+ bin directory is correctly added to your path, you will be able to simply:
jshell File.java — File.java being your file of course. main method: jshell> File.main(null)./exitFull documentation for JShell can be found here.