1 class A {
2 public static void main(String args[]){
3 System.out.println("Hello World");
4 }
5}
1javac MyFisrtProgam.java // enter to compile
2 java MyfirstProgram // run program
3
1// Assuming that you have an executable jar
2java -jar myJavaProject.jar
3
4// Assuming that you have packaged jar
5java -jar target/myJavaProject.jar