how to run java command in linux code example
Example 1: how to run java program in linux server
javac HelloWorld.java
java HelloWorld
Example 2: run java from terminal linux
//To compile, type
javac filename.java
//To run the generated class file, use
java filename