Skip to content

Quickstart

This guide gets you from a clone to a working analysis.json in a couple of minutes. For installation alternatives (native binary, pre-built JAR via the Python SDK), see Installation.

  • A Linux, macOS, or WSL machine
  • A JDK, version 11 or above (Java 17 recommended). We suggest installing it with SDKMan!
  1. Install a JDK (Java 17 shown here, via SDKMan!):

    Terminal window
    sdk install java 17.0.10-sem
    sdk use java 17.0.10-sem
  2. Clone and build the fat JAR:

    Terminal window
    git clone https://github.com/codellm-devkit/codeanalyzer-java
    cd codeanalyzer-java
    ./gradlew fatJar

    The build produces a self-contained JAR at build/libs/codeanalyzer-2.3.7.jar.

  3. Confirm it runs:

    Terminal window
    java -jar build/libs/codeanalyzer-2.3.7.jar --version

Analysis level 1 parses source and builds the symbol table. It does not require building the target project, so it’s quick:

Terminal window
java -jar build/libs/codeanalyzer-2.3.7.jar \
-i /path/to/your/project \
-a 1 \
-o ./output

This writes ./output/analysis.json containing the symbol_table for every .java file.

Analysis level 2 additionally builds the WALA call graph. By default codeanalyzer will build the target project (so WALA has compiled classes and resolved dependencies to work from):

Terminal window
java -jar build/libs/codeanalyzer-2.3.7.jar \
-i /path/to/your/project \
-a 2 \
-o ./output \
-v

The -v flag streams progress logs so you can watch the build and call-graph construction.

No project, no build — pass Java source directly and get a symbol table back on stdout:

Terminal window
java -jar build/libs/codeanalyzer-2.3.7.jar \
-s "public class Hello { public static void main(String[] a){} }" \
-a 1

analysis.json has this top-level shape:

{
"symbol_table": { "/abs/path/File.java": { /* compilation unit */ } },
"call_graph": [ /* caller→callee edges, present at level 2 */ ],
"version": "2.3.7"
}

Continue to the Output schema for the full structure, or the CLI reference for every flag.