最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

bazel - Difference between --java_runtime_version and --tool_java_runtime_version - Stack Overflow

programmeradmin0浏览0评论

Based on the doc: /docs/bazel-and-java

To configure the JVM used for execution and testing use --java_runtime_version flag. The default value is local_jdk.

There is a second pair of JDK and JVM used to build and execute tools, which are used in the build process, but are not in the build results. That JDK and JVM are controlled using --tool_java_language_version and --tool_java_runtime_version. Default values are 11 and remotejdk_11, respectively.

Bazel uses two types of Java toolchains: - execution, used to execute and test Java binaries, controlled with --java_runtime_version flag - compilation, used to compile Java sources, controlled with --java_language_version flag

My understanding is that there are two JDK/JVM used each with two types of toolchains:

  1. Execution & testing (--java_runtime_version & `--java_language_version)
  2. Build and execute tools (--tool_java_runtime_version & `--tool_java_language_version)

I'm confused about several points:

  • What refers to tools? I'm not too familiar with Java ecosystem
  • If I specify remotejdk_17 for all 4 flags, does it ever use the host machine's jdk?
发布评论

评论列表(0)

  1. 暂无评论