## Command Line Comparisons |

| JProfiler's command line comparison facility allows you to export a number of snapshot comparisons as HTML, CSV or XML. This is especially convenient if you use offline profiling and wish to generate comparisons in an automated fashion. There are two ways to programmatically generate comparisons: with the special command line executable with the ant task In both cases you specify a number of snapshots and a number of comparison names together with a set of options for each comparison. Each comparison has its own set of options. The options can be used to adjust the presentation and the displayed data. For each selection step in the comparison wizards, an option is provided that allows you to perform the same selection for the command line comparison. Most comparisons in JProfiler support multiple output formats. By default, the output format is deduced from the extension of the output file: .html export as HTML file. Note that a directory named `jprofiler_images` will be created that contains images used in the HTML page. .csv export as CSV data, the first line contains the column names. Note: When using Microsoft Excel, CSV is not a stable format. Microsoft Excel on Windows takes the separator character from the regional settings. JProfiler uses a semicolon as the separator in locales that use a comma as a decimal separator and a comma in locales that use a dot as a decimal separator. If you need to override the CSV separator character you can do so by setting -Djprofiler.csvSeparator in `bin/export.vmoptions`. .xml export as XML data. The data format is self-descriptive. If you would like to use different extensions, you can use the format option to override the choice of the output format.

| The export will fail if one of the specified snapshot files does not exist you specify an unrecognized option you specify an unrecognized comparison name the output file cannot be written an option has an invalid value an option leads to an invalid selection in JProfiler, e.g. if a class cannot be found You can choose to ignore errors by using the global ignoreerrors option.