Example.java is not found

Asked

Viewed 69 times

0

recorded Example.java in the Documents folder, used cmd in the javac directory, but when running javac it does not find Example.java.

  • have to run in the same folder as the java. Right-click holding shift, and select open a command window here, thus, the prompt will open on the same file screen.

  • And you have to add the Java directory to the OS Path, if you’re from Windows you can see here how it does: How to change PATH in Windows

1 answer

1

You should navigate to the folder where the file is for example in C: Project: cd C:\Projeto, then execute the command: javac Example.java.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.