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
1//Run this line to compile
2javac programName.java
3
4//Run this line to run
5java programName