+ 2

Hi.How can I use windows cmd to run a Java file and where should I address the path of windows?

9th Oct 2017, 8:57 PM
Kourosh Sajjadi
Kourosh Sajjadi - avatar
3 Réponses
+ 4
If you have a .jar file for your Java program, then you can run it with cmd. With cmd, use cd to get to your location of your .jar file. (i hope you know how) Once you get to the location of the .jar file, do java -jar ExampleJar.jar (ExampleJar.jar is an example...) Doing that should run the program.
10th Oct 2017, 1:56 AM
Dgames Crew
Dgames Crew - avatar
+ 3
9th Oct 2017, 9:50 PM
Manual
Manual - avatar
+ 2
Another interesting thing( for me at least) for eclipse user is how to build your program. You have to export, then you go to java folder and can export to a .jar file, then you use like the felow told you. but you can export to a EXECUTABLE .jar file. Hence you just need to Double click it. Good coding bro.
10th Oct 2017, 10:37 AM
LF Campos
LF Campos - avatar