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

前端 未结 14 1170
醉梦人生
醉梦人生 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条回答
  •  旧时难觅i
    2020-12-10 06:57

    I had same problem. The origin of the problem was the creation of text file in Notepad and renaming it as a java file. This implied that the file was saved as WorCount.java.txt file.

    To solve this I had to save the file as java file in an IDE or in Nodepad++.

提交回复
热议问题