javac: file not found: first.java Usage: javac

前端 未结 14 1091
醉梦人生
醉梦人生 2020-12-10 06:42

I have a filename named \"first.java\" saved on my desktop in notepad++. When I run the cmd command \"javac first.java\" it gives me this error.

javac: file          


        
14条回答
  •  有刺的猬
    2020-12-10 07:10

    So I had the same problem because I wasn't in the right directory where my file was located. So when I ran javac Example.java (for me) it said it couldn't find it. But I needed to go to where my Example.java file was located. So I used the command cd and right after that the location of the file. That worked for me. Tell me if it helps! Thanks!

提交回复
热议问题