{"record":{"id":"2df56524072dda0d","repo":"windmill-labs/windmill","slug":"java-is-not-available-because-the-feature-is-not-e","errorCode":null,"errorMessage":"Java is not available because the feature is not enabled","messagePattern":"Java is not available because the feature is not enabled","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/windmill-worker/src/worker.rs","lineNumber":6758,"sourceCode":"                    job,\n                    conn,\n                    client,\n                    parent_runnable_path,\n                    inner_content: &code,\n                    job_dir,\n                    requirements_o: lock.as_ref(),\n                    shared_mount: &shared_mount,\n                    base_internal_url,\n                    worker_name,\n                    envs,\n                    occupancy_metrics,\n                }))\n                .await\n            }\n        }\n        ScriptLang::Java => {\n            #[cfg(not(feature = \"java\"))]\n            return Err(anyhow::anyhow!(\n                \"Java is not available because the feature is not enabled\"\n            )\n            .into());\n\n            #[cfg(feature = \"java\")]\n            {\n                if run_inline {\n                    return Err(Error::internal_err(\n                        \"Inline execution is not yet supported for this language\".to_string(),\n                    ));\n                }\n                Box::pin(handle_java_job(JobHandlerInputJava {\n                    mem_peak,\n                    canceled_by,\n                    job,\n                    conn,\n                    client,\n                    parent_runnable_path,","sourceCodeStart":6740,"sourceCodeEnd":6776,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/windmill-worker/src/worker.rs#L6740-L6776","documentation":"Java script execution is an optional cargo feature (`java`) in Windmill. If a job for a Java script reaches a worker binary compiled without that feature, the executor returns this error before attempting any run, because the JVM integration is not linked into the binary.","triggerScenarios":"Dispatching a script with language `java` to a worker built without `--features java` (default dev build, minimal self-hosted build, or an image variant without Java support).","commonSituations":"Default `cargo run` dev backends, slim Docker images, workspaces where Java scripts exist but no java-enabled worker is deployed.","solutions":["Rebuild the worker with `--features java` included","Deploy a worker image with Java support and route java jobs to it via tags","Rewrite the script in a supported language if Java is not required"],"exampleFix":"// before\ncargo run --features quickjs\n// after\ncargo run --features quickjs,java","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await runScript(\"java\", code);\n} catch (e) {\n  if (String(e).includes(\"Java is not available\")) {\n    // rebuild with --features java or reroute to a java-enabled worker\n  }\n}","preventionTips":["Include `java` in the worker's --features for any workspace using Java scripts","Keep a feature checklist per deployed worker image","Route language-specific jobs to matching worker tags"],"tags":["feature-flag","java","build-config"],"backgroundTag":"feature-not-enabled","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}