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

前端 未结 14 1138
醉梦人生
醉梦人生 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:00

    Sometimes this issue occurs, If you are creating a java file for the first time in your system. The Extension of your Java file gets saved as the text file.

    e.g Example.java.txt (wrong extension)

    You need to change the text file extension to java file.

    It should be like:

    Example.java (right extension)

提交回复
热议问题