Full tutorial: https://springaicommunity.mintlify.app/acp-java-sdk/tutorial/30-vscode-integration
Connect your Java ACP agent to VS Code using the community vscode-acp extension.
VS Code doesn't have native ACP support yet (Issue #265496 is under discussion), but the community extension by omercnet provides full ACP functionality.
Key insight: The same agent JAR works in Zed, JetBrains, and VS Code!
- VS Code installed
- vscode-acp extension installed (see Step 1)
- Java 17+ installed
- This module built (see Step 2)
- Open VS Code
- Press
Ctrl+Shift+Xto open Extensions - Search for "VSCode ACP" by omercnet
- Click Install
Or install from command line:
code --install-extension omercnet.vscode-acp# From the tutorial root directory
./mvnw package -pl module-30-vscode-integration -q
# Verify the JAR was created
ls -la module-30-vscode-integration/target/vscode-agent.jarThe vscode-acp extension auto-detects agents from your PATH. Create a wrapper script:
# Create the wrapper script
cat > ~/.local/bin/java-tutorial-agent << 'EOF'
#!/bin/bash
exec java -jar /absolute/path/to/vscode-agent.jar "$@"
EOF
# Make it executable
chmod +x ~/.local/bin/java-tutorial-agent
# Add to PATH if needed (add to ~/.bashrc or ~/.zshrc)
export PATH="$HOME/.local/bin:$PATH"Important: Replace /absolute/path/to/vscode-agent.jar with:
realpath module-30-vscode-integration/target/vscode-agent.jarCreate %USERPROFILE%\bin\java-tutorial-agent.cmd:
@echo off
java -jar C:\path\to\vscode-agent.jar %*Add %USERPROFILE%\bin to your PATH environment variable.
# Test the wrapper script
java-tutorial-agent
# Should print:
# [VSCodeAgent] Starting Java ACP agent...
# [VSCodeAgent] Ready - waiting for VS Code to connect...
# Press Ctrl+C to stop- Click the VSCode ACP icon in the Activity Bar (sidebar)
- Click Connect
- Select your agent from the dropdown
- Start chatting!
┌─────────────────────────────────────────────────────────────┐
│ VS Code │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ vscode-acp Extension │ │
│ │ You: Hello! │ │
│ │ Agent: Hello from VS Code! I'm a Java ACP agent... │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ Finds agent in PATH │
│ │ │
└───────────────────────────┼─────────────────────────────────┘
│
▼
┌────────────────────────┐
│ java-tutorial-agent │
│ (wrapper script) │
│ │ │
│ ▼ │
│ java -jar agent.jar │
└────────────────────────┘
The vscode-acp extension provides:
| Feature | Description |
|---|---|
| Multi-Agent Support | Connect to multiple ACP agents |
| Native Chat Interface | Integrated sidebar chat |
| Tool Visibility | Expandable tool execution details |
| Streaming | Real-time response streaming |
| Rich Markdown | Syntax highlighting in responses |
- Verify the wrapper script is in PATH:
which java-tutorial-agent
- Verify script is executable:
ls -la ~/.local/bin/java-tutorial-agent - Restart VS Code after adding to PATH
- Check extension is enabled in Extensions panel
- Look for errors in VS Code Developer Console (
Help → Toggle Developer Tools) - Try reinstalling the extension
- Test the agent manually first:
java-tutorial-agent
- Check Java is accessible:
java -version
| IDE | Configuration Method | Native Support |
|---|---|---|
| Zed | settings.json |
✅ Yes |
| JetBrains | acp.json |
✅ Yes (25.3 RC+) |
| VS Code | PATH + extension | ⏳ Community only |
The same vscode-agent.jar can be configured in all three editors!
Microsoft is tracking ACP support in Issue #265496. The current status is "under discussion."
If/when native support arrives, configuration would likely follow a similar pattern to Zed's settings.json approach.
- Module 31: Build a Claude-powered ACP agent
- Review Modules 28-29 to see the same agent in Zed and JetBrains
Write once, configure anywhere: This Java agent works in Zed, JetBrains IDEs, and VS Code with zero code changes. That's the power of ACP!