how to run java program in linux server

Java
javac HelloWorld.java

java HelloWorld
Source

Also in Java: