my folder with all classes my program needs looks like this
The program successfully runs in Intellij idea Embedded Local Terminal but it isn't running in command prompt(cmd).
I run my program in cmd like this
C:\Users\misha\IdeaProjects\Elib\src>javac -cp . myTask\Main.java
But it just creates .class files.
The command javac
compiles the file(s) you specify. After (successful) compilation, you are able to run the compiled files. Simply after compiling run java
command on your public class that contains the main
method.