Unable to execute command line in checkstyle

Viewed 534

I want to configure a check in checkstyle plugin. I have made a config.xml file and a Test file in java. When on terminal I execute the command java -jar E:/Downloads/checkstyle-8.38-all.jar -c /config.xml Test.java it shows Files to process must be specified, found 0. whereas I have mentioned the files and they are in the same project. I have made my default download folder in E drive.I have also added jar file to external Libraries.enter image description here

The path of jar file is correct, I have checked it multiple times.

1 Answers

The problem is you're in the wrong directory. Checkstyle can't find your Test.java file.

So before running java -jar E:/Downloads/checkstyle-8.38-all.jar -c /config.xml Test.java, enter into the 'src' directory with command: cd src.

Related