JMU JMU - Department of Computer Science
Help Tools
Installing checkstyle for jGRASP


1 Components

To install checkstyle you must have the .jar file containing the class files. You may also have a custom .xml "checks" file that encapsulates the style guide (or you may use one of the built-in checks files).

2 Storing the File(s)

The .jar file and the .xml file can, in principal, be anywhere on the file system. Where you put them depends on the kind of machine you will be working on and personal preference.

2.1 Lab Computers

If you are using a lab computer, there are two options. You can store the two files in your directory/folder in the network file system or on a USB drive (or both). In any event, you will probably need to configure jGRASP to use them every time you login (since these machines are "cleaned up" regularly.

2.2 Personal Computers

There are two likely places to store the files.
  • A directory/folder named checkstyle at the same level as the directory/folder containing jGRASP
  • The directory/folder that contains the check files that come with jGRASP (e.g., /opt/jgrasp/extensions/tools or \Program Files (x86)\jGRASP\extensions\tools).

3 Configuring jGRASP

In jGRASP, click on Tools, pull down to Checkstyle and across to Configure (or Settings, depending on the version). In the field labeled "Checkstyle Home or Jar" navigate to the directory containing the .jar file (not the .jar file itself). In the field labeled "Checks File" navigate to the .xml file. Then, click on OK.

You must exit and re-start jGRASP for the change to take effect.

Copyright 2019