+ 2

when I try to compile the code using command prompt it says javac: file not found: ExampleProgram.java what should I do?

6th Oct 2016, 2:37 AM
fachri izzudin
fachri izzudin - avatar
5 odpowiedzi
+ 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.
6th Oct 2016, 6:14 PM
ITZBRAM418
ITZBRAM418 - avatar
+ 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
6th Oct 2016, 2:43 AM
Wanderlei Borges
Wanderlei Borges - avatar
+ 1
ensure that you put the right command
8th Dec 2016, 11:01 AM
Ajay Ramamurthy
Ajay Ramamurthy - avatar
+ 1
javac filename.java
8th Dec 2016, 11:01 AM
Ajay Ramamurthy
Ajay Ramamurthy - avatar
- 3
don't know
6th Oct 2016, 9:24 AM
kalidas pardhi
kalidas pardhi - avatar