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
相关产品推荐
相关产品推荐

