Skip to content

Installation

Download and install LeanJ from GitHub Releases. Get up and running in minutes.

  • Java JDK 11+ - Required for profiling Java applications
  • IntelliJ IDEA 2023.1+ (optional) - For IDE integration
  1. Go to GitHub Releases
  2. Download the latest release archive for your platform:
    • Windows: leanj-<version>-windows.zip
    • Linux: leanj-<version>-linux.tar.gz
    • macOS: leanj-<version>-macos.tar.gz

Extract the downloaded archive. You should see the following structure:

leanj-<version>/
├── agent/
│ └── agent-core-1.0.0-SNAPSHOT.jar
├── controller/
│ └── controller-1.0.0-SNAPSHOT.jar
├── cli/
│ └── leanj.exe (Windows) or leanj (Linux/macOS)
└── intellij-plugin/
└── leanj-1.0.0-SNAPSHOT.zip

The CLI (leanj) needs to be accessible from anywhere on your system.

  1. Copy leanj.exe to a directory (e.g., C:\tools)
  2. Add that directory to your system PATH:
    • Open System Properties → Environment Variables
    • Edit the PATH variable
    • Add C:\tools (or your chosen directory)
    • Click OK to save
  3. Restart your terminal

Alternative: Set system property in IntelliJ IDEA:

  • Go to Help → Edit Custom VM Options…
  • Add: -Dleanj.profiler.cli.path=C:\path\to\leanj.exe
  • Restart IDE

Option 1: System-wide installation

Terminal window
sudo cp cli/leanj /usr/local/bin/

Option 2: User-local installation

Terminal window
mkdir -p ~/bin
cp cli/leanj ~/bin/
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc # or ~/.zshrc
source ~/.bashrc # or ~/.zshrc
  1. In IntelliJ IDEA, go to File → Settings → Plugins
  2. Click ⚙️ → Install Plugin from Disk…
  3. Select the plugin ZIP file: intellij-plugin/leanj-1.0.0-SNAPSHOT.zip
  4. Click OK
  5. Restart IDE when prompted

Method 2: Install from Marketplace (If Available)

Section titled “Method 2: Install from Marketplace (If Available)”
  1. In IntelliJ IDEA, go to File → Settings → Plugins
  2. Search for “LeanJ”
  3. Click Install
  4. Restart IDE when prompted

Test that everything is working:

Terminal window
# Check CLI is accessible
leanj --version
# Run system health check
leanj doctor

Expected output:

✓ Java: Found (11.0.19)
✓ Go: Found (1.21.0)
✓ Controller JAR: Found
✓ Agent JAR: Found
✓ Tools.jar: Found
✓ Controller: Not running (expected)
✓ Ports: Available (9876, 9877)

Error: leanj: command not found

Solutions:

  1. Verify CLI is in the extracted archive
  2. Check PATH includes the CLI directory
  3. Restart terminal after adding to PATH
  4. On Windows, verify file extension is .exe

Error: Plugin won’t install or appears corrupted

Solutions:

  1. Verify ZIP file is complete (check file size)
  2. Try downloading the release again
  3. Ensure IntelliJ IDEA version is 2023.1 or later
  4. Check IDE logs: Help → Show Log in Finder

Error: Controller JAR not found

Solutions:

  1. Verify controller/controller-1.0.0-SNAPSHOT.jar exists in extracted archive
  2. Ensure you extracted the full archive, not just the CLI
  3. Check file permissions (Linux/macOS)

Error: Agent JAR not found

Solutions:

  1. Verify agent/agent-core-1.0.0-SNAPSHOT.jar exists in extracted archive
  2. Ensure you extracted the full archive
  3. Check file permissions (Linux/macOS)

After installation, your files should be organized like this:

Windows:

C:\tools\leanj.exe # CLI (in PATH)
C:\leanj\
├── agent\agent-core-*.jar # Agent JAR
└── controller\controller-*.jar # Controller JAR

Linux/macOS:

/usr/local/bin/leanj # CLI (in PATH)
~/leanj/
├── agent/agent-core-*.jar # Agent JAR
└── controller/controller-*.jar # Controller JAR

If you need to build from source (for development or custom builds), see the GitHub repository for build instructions.