You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JDTLS spawns separate process per module in Java Maven multi-module projects #28760
In a Maven multi-module project (parent pom.xml with <modules>), JDTLS spawns a separate process for each submodule instead of sharing a single instance at the topmost parent pom.xml.
Opening Java files in module-a and module-b each starts a separate JDTLS process. Each JDTLS instance uses ~1GB, so a project with 5+ modules easily consumes 5GB+ of memory.
The existing fix (#14192) resolved this for Gradle monorepos by walking up to find settings.gradle. However, Maven multi-module projects were not addressed — the root detection still falls back to the nearest pom.xml for Maven projects.
Steps to reproduce
Create a Maven multi-module project with a parent pom.xml and 3+ child modules
Open Java files from different modules in opencode
Observe multiple JDTLS processes via ps aux | grep jdtls
changed the title [-]JDTLS spawns separate process per module in Maven multi-module projects[/-][+]JDTLS spawns separate process per module in Java Maven multi-module projects[/+]on May 22, 2026
#11368 is not exactly the same as this issue. It's already closed, but the Java Maven multi-module scenario was not fixed. opencode spawns numerous JDTLS processes, making LSP nearly unusable for Java projects. The PR I submitted fixes this issue.
Confirmed, the Maven multi-module issue is still there. This screenshot can help you realise what the multi-module Maven situation with OpenCode is :-) Fixing this issue will really help a lot with development process for more complex repositories and will free gigabytes of RAM.
Activity
github-actions commentedon May 22, 2026
This issue might be a duplicate of (or closely related to) an existing issue. Please check:
[-]JDTLS spawns separate process per module in Maven multi-module projects[/-][+]JDTLS spawns separate process per module in Java Maven multi-module projects[/+]areyouok commentedon May 23, 2026
#11368 is not exactly the same as this issue. It's already closed, but the Java Maven multi-module scenario was not fixed. opencode spawns numerous JDTLS processes, making LSP nearly unusable for Java projects. The PR I submitted fixes this issue.
scrumpypoker commentedon Jun 7, 2026
Confirmed, the Maven multi-module issue is still there. This screenshot can help you realise what the multi-module Maven situation with OpenCode is :-) Fixing this issue will really help a lot with development process for more complex repositories and will free gigabytes of RAM.
areyouok commentedon Jun 8, 2026
@scrumpypoker You can use my PR and build it yourself. I’ve been using it for days.