+ 1
How to use CMD to run java codes
I always use IDEs like Netbeans or Eclipse for execution of my java code suggest a stepwise procedure to run the java code using CMD
5 Respuestas
+ 4
Make a notepad file with code.
Then save it to some random place woth name classname.java
Open CMD, and redirect it to the folder in which you saved your class.
$javac classname.java
This would compile your class
$javac classname
This would run your program
+ 4
you forgot $ sign
+ 2
thanks @luka
+ 1
On Eclipse(never used netbeans, but suppose it is similar) you can export your code as a executable java program, then double click it. This way you creates your program.exe ,😎
0
it is showing javac as unrecognised command !! if I follow above answer