Skip to content

Upgrade Bazel container to Java 11 or higher #2186

Open

Description

@lruellan

Hi,

Recently, my builds on Google Cloud Build that use gcr.io/bazel-public/bazel started failing when processing rules_jvm_external. Someone pointed out that rules_jvm_external no longer supports Java 8. But it looks like the Bazel container includes Java 8. Is it possible to create a container image of Bazel that uses Java 11 or higher?

Activity

  1. self-assigned this
    on Mar 4, 2025
  2. z3ntu commented on Aug 5, 2025

    @z3ntu

    I think I'm also hitting issues due to the container containing Java 8 which has been EOL since more than 3 years ago

    INFO: From Executing genrule @@+fuzzyc_extension+fuzzyc//:fuzzyc_cc_function_sources:
    Downloading antlr4-4.11.1-complete.jar
    Error: A JNI error has occurred, please check your installation and try again
    Exception in thread "main" java.lang.UnsupportedClassVersionError: org/antlr/v4/Tool has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    

    Java 11 is also EOL since close to two years ago, so maybe just jump to an up-to-date Java version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions