javac file not found

已回答

I was trying to make a class file using javac but instead it is not giving me the class file as it was not found

What should i do???

0
Avatar
Margarita Tyumenkova

Hello codingtillthe-end12 ,

You should provide the correct path to java file when you execute javac command.

For example, you are inside <project root folder>/src, but your java file is located in <project root folder>/src/main. You have 2 options:

- run command from <project root folder>/src the following way: javac main/file.java

- at first navigate to <project root folder>/src/main, then run: javac file.java

0

请先登录再写评论。