Is your feature request related to a problem? Please describe.
PROBLEM
JCodeanalyzer's ensure_jdk downloads a Temurin JDK into each analysis cache dir — per project, potentially per service — so a machine analyzing ten projects fetches ten JDKs. This defeats pre-baking a JDK into a container image and costs a network fetch per analyzed project. Surfaced by COCOA's Docker packaging (codellm-devkit/cocoa#1).
SCOPE BOUNDARY
JDK discovery only. Not the analyzer distribution — sourcing codeanalyzer-java from PyPI was tried and reverted over GraalVM issues (#161, #162, closed won't-do), so the bundled jar stays and this must be solved on its own terms. Not JDK version policy, and not the pinned JDK_RELEASE itself.
GOALS
CAVEATS AND KNOWN RISKS
- Presence is not compatibility.
JAVA_HOME on a dev machine is frequently stale or points at a different major. Accepting it unverified moves the failure from "slow download" to "analyzer crashes with an obscure JVM error" — strictly worse.
- Silent fallback hides misconfiguration: a user who sets
JAVA_HOME expecting it to be used, and is quietly ignored, has no signal. Hence the log line is part of the contract, not polish.
- The per-project cache dir is also what makes analyses independent; a shared global JDK path is shared mutable state across concurrent runs.
DEFINITION OF DONE
- With a compatible
JAVA_HOME set, analysis completes and no download occurs — asserted in a test, not observed by eye.
- With an incompatible JDK on
JAVA_HOME, the run falls back to download and logs the reason.
- A container image with a pre-baked JDK analyzes a project with no network access to Adoptium.
Describe the solution you'd like
Not stated in the original issue.
Describe alternatives you've considered
Not stated in the original issue.
Is your feature request related to a problem? Please describe.
PROBLEM
JCodeanalyzer'sensure_jdkdownloads a Temurin JDK into each analysis cache dir — per project, potentially per service — so a machine analyzing ten projects fetches ten JDKs. This defeats pre-baking a JDK into a container image and costs a network fetch per analyzed project. Surfaced by COCOA's Docker packaging (codellm-devkit/cocoa#1).SCOPE BOUNDARY
JDK discovery only. Not the analyzer distribution — sourcing
codeanalyzer-javafrom PyPI was tried and reverted over GraalVM issues (#161, #162, closed won't-do), so the bundled jar stays and this must be solved on its own terms. Not JDK version policy, and not the pinnedJDK_RELEASEitself.GOALS
JAVA_HOME, then aCLDK_JDKenv or global cache path.CAVEATS AND KNOWN RISKS
JAVA_HOMEon a dev machine is frequently stale or points at a different major. Accepting it unverified moves the failure from "slow download" to "analyzer crashes with an obscure JVM error" — strictly worse.JAVA_HOMEexpecting it to be used, and is quietly ignored, has no signal. Hence the log line is part of the contract, not polish.DEFINITION OF DONE
JAVA_HOMEset, analysis completes and no download occurs — asserted in a test, not observed by eye.JAVA_HOME, the run falls back to download and logs the reason.Describe the solution you'd like
Not stated in the original issue.
Describe alternatives you've considered
Not stated in the original issue.