简体   繁体   中英

Running an executable Java jar - Higher Version vs Lower Version?

I have created a program and trying to covert it an executable jar. I created the executable jar via eclipse - runnable jar. The installed JDK in my machine is Java 1.8

If i forward this jar to others, do they need JDK 1.8 runtime libraries or JDK 1.8 version in their system to execute the jar?

What is the minimum requirement in their system?

Thanks.

If the the versions of the compiled classes are 52.0 , so they are for Java 8, then the minimum requirement is JRE 8. Java is backward compatible , not forward.

However, you can use the Java compiler to produce code with older class versions, then the program can be run with older JRE. Of course, in this case you cannot use features not existing in the older Java version.

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