"File not found: *.java" appears after executing the javac command

Asked 2 months ago, Updated 2 months ago, 2 views

The javac command was available until yesterday, but the following message suddenly appears:We are looking for solutions.

Displayed Messages

javac: File not found: konp.java
Usage: javac<options><source files>
Use -help for a list of available options.


public class konp{
  public static void main(String[]args) {
    int sales [ ]; // Declaration
    sales=new int[4];// Free space
    sales[0] = 150;
    sales[1] = 200;
    sales[2] = 140;
    sales[3] = 400;
    // sales.length; // Number of regions 4


Run Environment
Windows 7 (64bit)


2022-09-30 11:25

1 Answers

There are many reasons for the "Files Not Found" system, but I think it's faster to check the basics first.

  • If the pathname of a missing file is an absolute path, specify the absolute path and use the command to verify that the file exists.
  • For relative paths, check the working directory of the program where the error occurred, specify an early exit path in that directory, and check with the command to see if the file exists.
  • If you do not know the path, you may run a system call trace such as trace on Linux and find an open error in the trace results.

2022-09-30 11:25

If you have any answers or tips

© 2022 OneMinuteCode. All rights reserved.