+ 2
when I try to compile the code using command prompt it says javac: file not found: ExampleProgram.java what should I do?
5 Respuestas
+ 2
say the project is in C:\Users\YourName\Documents\Java
you would write in the CMD: cd C:\Users\YourName\Documents\Java
then press enter and type: javac ExampleProgram.Java
if there are no errors the CMD should take you to the next line
and type: Java ExampleProgram
and it should run.
+ 1
you need to go the directory, ex:cd c:/folderName and then use the command javac fileName.java.To tun after compile: java fileName
+ 1
ensure that you put the right command
+ 1
javac filename.java
- 3
don't know