简体   繁体   中英

Running a jar with depedency jar at a different java version

My project is running with java 7 while one of my dependency jar was built with java 8 according to its manifest file .I want to run my project in form of jar with dependencies at java 1.7 ! Is it possible to change to java version of the dependency jar to lower version that is from 1.8 to 1.7 ?

It looks like a really bad idea.

You will most likely encounter UnsupportedClassVersionError :

Class UnsupportedClassVersionError

 public class UnsupportedClassVersionError extends ClassFormatError 

Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM