run java application in terminal code example
Example 1: java in terminal
jshell
| Welcome to JShell -- Version 12.0.1
| For an introduction type: /help intro
jshell> int i=99;
i ==> 99
jshell> System.out.println(i);
99
Example 2: how to run a java file in terminal
javac FirstJavaProgram.java