Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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). Both are java 8 and to be upgraded to 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. I am thinking just upgrading the Proj X to java 11 and spring boot 2, and use the java 8 version of Proj D.

Will that work? I am asking just to have a clear path on what should I do in order and prioritize.

like image 513
shepard23 Avatar asked Feb 04 '26 19:02

shepard23


1 Answers

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. Consider your time and Upgrading is always a better option.

like image 189
Gowtham Avatar answered Feb 07 '26 08:02

Gowtham



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!