You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google OR Tools是否支持JDK 8?项目引入Jar运行报错咨询

Google OR Tools 与 JDK 8 兼容性问题解答

Hey there, let's break this down clearly:

Google OR Tools dropped support for JDK 8 starting from version 9.0 — that's exactly why you're seeing the "JDK version too old" error when trying to run your code.

Here's what you can do if you're stuck on JDK 8 for your project:

  • Stick to OR Tools 8.x versions. The last stable release in the 8.x line is 8.10.8807, which is fully compatible with JDK 8.
  • When setting up your dependencies (whether using Maven, Gradle, or another build tool), make sure to explicitly specify this older version. For example, in Maven, your dependency block would look like this:
<dependency>
    <groupId>com.google.ortools</groupId>
    <artifactId>ortools-java</artifactId>
    <version>8.10.8807</version>
</dependency>
  • A quick heads-up: Older OR Tools versions won't get security patches or new features anymore. If your project is going to be maintained long-term, it's worth planning an upgrade to a supported JDK version (JDK 11 or higher) down the line to keep things secure and up-to-date.

内容的提问来源于stack exchange,提问作者chrisb89

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 08:55:11