oraios/serena · error
Java {BSL_LS_MIN_JAVA_VERSION}+ is required for BSL Language
Error message
Java {BSL_LS_MIN_JAVA_VERSION}+ is required for BSL Language Server, but '{java_exe}' is Java {major}. Install a newer JDK (e.g. Temurin {BSL_LS_MIN_JAVA_VERSION}) and ensure it appears first on PATH or point JAVA_HOME to it. What it means
_verify_java_available raises RuntimeError when java is found on PATH but its detected major version is below BSLS_MIN_JAVA_VERSION. BSL Language Server requires a modern JDK; an old Java cannot run it.
Source
Thrown at src/solidlsp/language_servers/bsl_language_server.py:95
def _verify_java_available() -> None:
"""Ensures a suitable ``java`` (>= :data:`BSL_LS_MIN_JAVA_VERSION`) is on ``PATH``.
:raises RuntimeError: if ``java`` is missing or its major version is too low.
"""
java_exe = shutil.which("java")
if java_exe is None:
raise RuntimeError(f"Java {BSL_LS_MIN_JAVA_VERSION}+ is required for BSL Language Server but 'java' was not found on PATH.")
major = _get_java_major_version(java_exe)
if major is None:
# detection failed; log a warning but let the LSP attempt to start
log.warning("Could not determine Java version for '%s'; BSL LSP requires Java %d+.", java_exe, BSL_LS_MIN_JAVA_VERSION)
return
if major < BSL_LS_MIN_JAVA_VERSION:
raise RuntimeError(
f"Java {BSL_LS_MIN_JAVA_VERSION}+ is required for BSL Language Server, but '{java_exe}' is Java {major}. "
f"Install a newer JDK (e.g. Temurin {BSL_LS_MIN_JAVA_VERSION}) and ensure it appears first on PATH "
f"or point JAVA_HOME to it."
)
class BSLLanguageServer(SolidLanguageServer):
"""
BSL (1C:Enterprise / OneScript) language server integration for Serena.
"""
def __init__(
self,
config: LanguageServerConfig,
repository_root_path: str,
solidlsp_settings: SolidLSPSettings,
):
super().__init__(View on GitHub (pinned to 7fcbca7e62)
Solutions
- Install a JDK >= the minimum (e.g. Temurin BSLS_MIN_JAVA_VERSION)
- Reorder PATH so the newer JDK's bin directory comes first (check `java -version`)
- Point JAVA_HOME at the newer JDK and ensure $JAVA_HOME/bin is on PATH
- Use a JDK version manager (sdkman/jenv) to select the required version for this project
Example fix
// before $ java -version openjdk version "1.8.0_312" # too old // after export JAVA_HOME=/usr/lib/jvm/temurin-17-jdk export PATH=$JAVA_HOME/bin:$PATH
Defensive patterns
Strategy: validation
Validate before calling
import shutil, re, subprocess
java = shutil.which("java")
if java:
out = subprocess.run([java, "-version"], capture_output=True, text=True).stderr
m = re.search(r'version "(\d+)', out)
if m and int(m.group(1)) < 17:
print(f"Java {m.group(1)} is too old; install JDK 17+ and put it first on PATH") Try / catch
try:
server = BSLLanguageServer(...)
except RuntimeError as e:
if "is Java" in str(e) and "BSL Language Server" in str(e):
switch_to_newer_jdk(min_version=17) # sdkman/jenv or JAVA_HOME update, then retry
else:
raise Prevention
- Keep a modern JDK (17+) as the default `java` on PATH for this project
- Use sdkman/jenv to pin the JDK per project so old system Java never shadows it
- Check `java -version` before starting Java-based language servers
When it happens
Trigger: Calling _create_launch_command when _get_java_major_version(java_exe) returns a major < BSLS_MIN_JAVA_VERSION — e.g. PATH resolves to Java 8 or 11.
Common situations: System default Java is an old LTS (8/11) used by other tools; multiple JDKs installed with the old one first on PATH; JAVA_HOME pointing to an old JDK; macOS defaulting to legacy Apple Java.
Related errors
- Java {BSL_LS_MIN_JAVA_VERSION}+ is required for BSL Language
- BSL Language Server JAR not found at {jar_path} after instal
- java_home='{explicit_home}' is invalid: '{candidate}' does n
- Could not locate a Java installation for JDTLS. Set ls_speci
- JDTLS requires JDK {JDTLS_MIN_JDK_VERSION}+ but '{java_exe}'
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/acdbda01516afaed.
Report an issue: GitHub.