Answers for "how to run a java file 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
3

run java from terminal

//Run this line to compile
javac programName.java

//Run this line to run
java programName
Posted by: Guest on March-23-2021
1

how to run a java file in terminal

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

Code answers related to "how to run a java file in terminal"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language