Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use a library compiled with Java 8 in a Java 7 application?

Simple question: If I have an application compiled with Java 7, can I use a library compiled with Java 8 with it? Of course, Java 8 is installed.

like image 569
Codeversum Avatar asked Nov 01 '22 11:11

Codeversum


1 Answers

To leave the question not-unanswered, I copied the comment from fge (emphasizes mine):

If you run a Java 8 JVM, yes; if you run a Java 7 JVM, no (you'll get an UnsupportedClassVersionError if you try).

like image 84
Nikolas Charalambidis Avatar answered Nov 12 '22 23:11

Nikolas Charalambidis