0

What's the command in cmd to compile and execute a java program??

2nd Apr 2021, 12:53 AM
AMAN
AMAN - avatar
2 Réponses
+ 2
compile to bytecode using javac, and execute using java javac (java file) java (classname)
2nd Apr 2021, 1:17 AM
durian
durian - avatar
+ 1
if you have set path to java bin, then eg javac -d .class Main.java java -cp .class Main here Main.java is example of your code file name
2nd Apr 2021, 1:20 AM
zemiak