[英]Can I use java-8 compiled project/library in a java-11 spring boot 2 project?
Maybe a stupid question, I am in a process of upgrading bunch of our frameworks/libraries to java 11. I have this 1 project (Project Dep) that is a dependency of another project (Proj X).也许是一个愚蠢的问题,我正在将我们的一堆框架/库升级到 java 11。我有这个 1 项目(Project Dep),它是另一个项目(Proj X)的依赖项。 Both are java 8 and to be upgraded to Java 11.
两者都是 java 8 并将升级到 Java 11。
However, both projects are big and might take days to be done, the Proj D is considerably larger (and used by a lot of devs) than Project X using it.然而,这两个项目都很大,可能需要几天时间才能完成,Proj D 比使用它的 Project X 大得多(并且被许多开发人员使用)。 I am thinking just upgrading the Proj X to java 11 and spring boot 2, and use the java 8 version of Proj D.
我正在考虑将 Proj X 升级到 java 11 和 spring 启动 2,并使用 java 8 版本的 Proj D。
Will that work?那会奏效吗? I am asking just to have a clear path on what should I do in order and prioritize.
我只是要求对我应该按顺序和优先级做什么有一个清晰的路径。
Yes, you could use the Project D(dependency Java 8) in Project X(Java 11) also Check for deprecation of packages in Java 11 and make sure you update the deprecated packages in Java 8 Project. Yes, you could use the Project D(dependency Java 8) in Project X(Java 11) also Check for deprecation of packages in Java 11 and make sure you update the deprecated packages in Java 8 Project. Or If you want to upgrade both to Java 11 not a problem.
或者如果你想同时升级到 Java 11 没问题。 Consider your time and Upgrading is always a better option.
考虑您的时间,升级始终是更好的选择。
It doesn't matter what version the project is in, it matters what version the JVM that will run it is.项目的版本无关紧要,运行它的 JVM 的版本很重要。 It must be at least the version of any of the dependencies.
它必须至少是任何依赖项的版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.