Answers for "how to compile a java program in terminal"

12

cmd java compile

javac MyFisrtProgam.java // enter to compile 
  java MyfirstProgram // run program
Posted by: Guest on July-09-2020
6

java run project from command line

// Assuming that you have an executable jar
java -jar myJavaProject.jar

// Assuming that you have packaged jar
java -jar target/myJavaProject.jar
Posted by: Guest on July-01-2020
1

how to run a java file in terminal

javac FirstJavaProgram.java
Posted by: Guest on August-25-2020
0

how to compile a java program in terminal

//Change directory into where all the java files are
javac *.java
//Chagne direcotry into com
java com.company.Main
Posted by: Guest on October-06-2021

Code answers related to "how to compile a java program in terminal"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language