windmill-labs/windmill · error
Java is not available because the feature is not enabled
Error message
Java is not available because the feature is not enabled
What it means
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.
Source
Thrown at backend/windmill-worker/src/worker.rs:6758
job,
conn,
client,
parent_runnable_path,
inner_content: &code,
job_dir,
requirements_o: lock.as_ref(),
shared_mount: &shared_mount,
base_internal_url,
worker_name,
envs,
occupancy_metrics,
}))
.await
}
}
ScriptLang::Java => {
#[cfg(not(feature = "java"))]
return Err(anyhow::anyhow!(
"Java is not available because the feature is not enabled"
)
.into());
#[cfg(feature = "java")]
{
if run_inline {
return Err(Error::internal_err(
"Inline execution is not yet supported for this language".to_string(),
));
}
Box::pin(handle_java_job(JobHandlerInputJava {
mem_peak,
canceled_by,
job,
conn,
client,
parent_runnable_path,View on GitHub (pinned to e474e8803c)
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
Example fix
// before cargo run --features quickjs // after cargo run --features quickjs,java
Defensive patterns
Strategy: fallback
Try / catch
try {
await runScript("java", code);
} catch (e) {
if (String(e).includes("Java is not available")) {
// rebuild with --features java or reroute to a java-enabled worker
}
} Prevention
- 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
When it happens
Trigger: 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).
Common situations: Default `cargo run` dev backends, slim Docker images, workspaces where Java scripts exist but no java-enabled worker is deployed.
Related errors
- JavaScript expression evaluation requires the `quickjs` feat
- Nu is not available because the feature is not enabled
- Ruby is not available because the feature is not enabled
- R is not available because the feature is not enabled
- Indexer mode requires compiling with the tantivy feature fla
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/2df56524072dda0d.
Report an issue: GitHub.