Refer to the exhibit. What does this warning indicate?
Exhibit
$ javac -d bin -cp lib/*.jar src/com/example/App.java warning: [path] bad path element "lib/*.jar": No such file or directory
Trap 1: The -cp option is misspelled.
The syntax is correct; the issue is that the path does not exist.
Trap 2: The destination directory bin does not exist.
The error is about the classpath, not the destination directory. javac creates the directory if needed.
Trap 3: The source file has syntax errors.
Syntax errors would be reported as errors, not as a path warning.
- A
The -cp option is misspelled.
Why wrong: The syntax is correct; the issue is that the path does not exist.
- B
The destination directory bin does not exist.
Why wrong: The error is about the classpath, not the destination directory. javac creates the directory if needed.
- C
The classpath is missing a required JAR file.
The warning indicates that the classpath contains an invalid path, likely because the JAR file is not present.
- D
The source file has syntax errors.
Why wrong: Syntax errors would be reported as errors, not as a path warning.