Configuration
The BBj Language Server extension provides various configuration options to customize your development experience.
VS Code Settings
All settings can be configured in VS Code's settings (Ctrl+, or Cmd+,) or directly in your settings.json file.
Core Settings
bbj.home
The path to your BBj installation directory.
{
"bbj.home": "/opt/bbj"
}
Required for most features to work properly. The extension uses this path to:
- Locate BBj executables for running programs
- Find configuration files
- Resolve built-in libraries
bbj.classpath
The name of the classpath entry to use for Java class resolution.
{
"bbj.classpath": "default"
}
This should match a classpath entry defined in your BBj Enterprise Manager.
Web/BUI Settings
bbj.web.username
Username for Enterprise Manager authentication.
{
"bbj.web.username": "admin"
}
bbj.web.password
Password for Enterprise Manager authentication.
{
"bbj.web.password": "admin123"
}
bbj.web.apps
Configuration for BUI application deployment.
{
"bbj.web.apps": {
"myapp": {
"program": "myapp.bbj",
"config": "myapp.arc"
}
}
}
bbj.web.AutoSaveUponRun
Automatically save files before running.
{
"bbj.web.AutoSaveUponRun": true
}
Default: false
Formatter Settings
bbj.formatter.indentWidth
Number of spaces for indentation.
{
"bbj.formatter.indentWidth": 2
}
Default: 2
bbj.formatter.removeLineContinuation
Remove line continuation characters when formatting.
{
"bbj.formatter.removeLineContinuation": true
}
Default: false
bbj.formatter.keywordsToUppercase
Convert BBj keywords to uppercase when formatting.
{
"bbj.formatter.keywordsToUppercase": true
}
Default: false
bbj.formatter.splitSingleLineIF
Split single-line IF statements into multiple lines.
{
"bbj.formatter.splitSingleLineIF": true
}
Default: false
Complete Settings Example
Here's a complete settings.json example with all BBj settings:
{
"bbj.home": "/opt/bbj",
"bbj.classpath": "default",
"bbj.web.username": "admin",
"bbj.web.password": "admin123",
"bbj.web.AutoSaveUponRun": true,
"bbj.formatter.indentWidth": 4,
"bbj.formatter.removeLineContinuation": false,
"bbj.formatter.keywordsToUppercase": true,
"bbj.formatter.splitSingleLineIF": false
}
Workspace Configuration
For project-specific settings, create a .vscode/settings.json file in your workspace root:
{
"bbj.home": "/path/to/project/bbj",
"bbj.classpath": "project-classpath"
}
Workspace settings override user settings for the specific project.
BBj Configuration Files
config.bbx
The BBj configuration file (config.bbx) is located at:
- Linux/Mac:
$BBJ_HOME/cfg/config.bbx - Windows:
%BBJ_HOME%\cfg\config.bbx
Access it quickly using the BBj: Show config.bbx command.
BBj.properties
The BBj properties file is located at:
- Linux/Mac:
$BBJ_HOME/cfg/BBj.properties - Windows:
%BBJ_HOME%\cfg\BBj.properties
Access it using the BBj: Show BBj.properties command.
Enterprise Manager
The extension can integrate with BBj Enterprise Manager for:
- Running BUI applications
- Managing classpath entries
- Configuring applications
Configure the connection using bbj.web.username and bbj.web.password.
Environment Variables
The extension respects the following environment variables:
| Variable | Description |
|---|---|
BBJ_HOME | BBj installation directory (fallback if bbj.home not set) |
JAVA_HOME | Java installation directory |
Java Interop Service
The Java interop service runs on port 5008 by default. It starts automatically when the extension activates but can also be started manually:
cd java-interop
./gradlew run
The service provides:
- Java class introspection
- Method signature resolution
- Field information
- Package structure
Troubleshooting Configuration
Verify BBj Home
Check that the configured bbj.home path is correct:
- Open VS Code Settings
- Search for "bbj.home"
- Verify the path exists and contains BBj files
Check Classpath
To see available classpath entries:
- Run command: BBj: Show Classpath Entries
- Verify your configured classpath is listed
Language Server Logs
Enable verbose logging to diagnose issues:
- Open Output panel (
View>Output) - Select "BBj Language Server" from the dropdown
- Look for configuration-related messages