Remove header_compiler_direct_opts from java_toolchain (#379) java_tools v21.0 bundles protobuf 36.0, whose Java runtime no longer uses sun.misc.Unsafe for standard generated code. That removes the JDK 24+ warning that motivated header_compiler_direct_opts as a TurbineDirect workaround. Drop the attribute before it becomes API surface. The direct header compiler no longer needs --sun-misc-unsafe-memory-access=allow for protobuf. A native turbine_direct_graal would also treat JVM flags passed through this attribute as Turbine command-line options. Fixes #374 RELNOTES: None Closes #379 COPYBARA_INTEGRATE_REVIEW=https://github.com/bazelbuild/rules_java/pull/379 from davido:revert-header-compiler-direct-opts eec72e458f6804ed52a699a92f82a5d52aca0693 PiperOrigin-RevId: 970407219 Change-Id: I30b00796fd175de88d05477fe9cc67a3cce5a2c7
Java Rules for Bazel https://bazel.build.
Documentation
For a quickstart tutorial, see https://bazel.build/start/java
The fastest way to try this in an empty project is to click the green “Use this template” button on https://github.com/bazel-starters/java.
For slightly more advanced usage, like setting up toolchains or writing your own java-like rules, see https://bazel.build/docs/bazel-and-java
Core Java rules
Add a load like:
load("@rules_java//java:java_library.bzl", "java_library")
to your BUILD / BUILD.bazel / *.bzl files
For detailed docs on the core rules, see https://bazel.build/reference/be/java