I get this error:
due to my java version. I would like to create a .jar file compatible with older versions of Java, as well as newer versions. My computer is not a problem, but my audience uses older versions of Java. How can I make my program compatible with old versions as well as new versions and how far should I go with it?
You can go back and compile your sources and create a new jar file with an older javac compatible with a specific version of java.
, , java .
, : Java ant javac
UnsupportedClassVersionError JAR (JAR - zip-), JAR.
UnsupportedClassVersionError
.class Java ByteCode, JVM ( Java) . Bytecode (Java 1991 .) , , , , JRE.
.class
TL;DR: , , JRE. . JRE , , .
. .class J2SE 1.8, JRE7. JRE 1.8.
, Java, JDK . JVM, , /, JRE, JDK .
JRE, JRE. , JRE , , .
IDE NetBeans.
Run → Install project configuration → Configure → In the left pane, select "Sources". Finally, select the minimum version of the JDK in source / binary format.
Source: https://habr.com/ru/post/1539470/More articles:How to determine if overriding is performed in a multiclass classifier - python-2.7Rails 3 action mailer production OpenSSL :: SSL :: SSLError: the host name does not match the server certificate - ruby-on-railsAngularJS: how to log out when cookie expires - javascriptiframe with event pointers: none; but with a div inside it with an event pointer: auto; - html5rails 4: base class type of polymorphic set instead of inherited - polymorphismnumpy - как массивы внешних соединений - pythonGenerate a random number from 1 to 3 / including 1 decimal place - c #LocalDB and Entity Framework 6 - Security - entity-framework-6gfortran does not work on Mac OS X 10.9 (Mavericks) - gfortranchange background color once every few seconds - background-colorAll Articles