Commands

Help

Get to know all the supported command-line parameters and options by running the following command.

java -jar DesigniteJava.jar -h
_images/dj2.0_console.png

Source code analysis

The following command performs the most simple form of analysis. The command takes two parameters: the path of the folder containing the Java project you would like to analyze and the path of the output folder where the tool will store the generated CSV or XML files.

java -jar DesigniteJava.jar -i <path of the input source folder> -o <path of the output folder>

Tip

The presence of .class files within provided source code folder path improves the accuracy of tool (due to better symbol resolution).

The tool looks for class folders (containing .class files) within provided source code folder. If the class folders do not fall in the provided source code folder under classes or bin subfolders, specify them using the -c option for accurate analysis. You may select multiple folder paths separated by a semi-colon.

java -jar DesigniteJava.jar -i <path of the input source folder> -o <path of the output folder> -c <path of the folders containing .class files>

Source code analysis (multi-commit analysis mode)

With DesigniteJava, you may analyze all or some commits of a Java repository. The following command will analyze all commits of main branch of a repository.

java -jar DesigniteJava.jar -i <path of the input source folder> -o <path of the output folder> -ac "main"

If you would like to analyze another branch, replace main in the previous command with branch name in the following format “refs/heads/<branch>”.

You may choose specific commits to mark as starting and ending points for the analysis. It can be achieved by using -fr (from commit) and -to (to commit), both inclusive. These options can be used independently i.e., it is not necessary to use them together.

Source code analysis (optimized multi-commit analysis mode)

DesigniteJava supports an optimized version of multi-commit analysis mode. This mode is very similar to regular multi-commit mode except internally the tool tries to reuse the source code information from the previous commits. The following command will analyze all commits of main branch of a repository in the optimized mode.

java -jar DesigniteJava.jar -i <path of the input source folder> -o <path of the output folder> -aco "main"

Register license

Register a license key (optional; applicable only for Enterprise edition)

java -jar DesigniteJava.jar -r <lic_key>

Of course, replace <lic_key> with the license key received from Designite. Designite team provides a node-locked license key when you buy a license key. If you are eligible, you may request an academic license key for free. Please refer Request an Academic License page for more details.

Tip

It is not recommended to move the DesigniteJava.jar file after the license key registration step. If you have to move the file, ensure that you either move the entire folder you created in step 2 above or, at least, move the jar file with the .config file created after the registration step.