Java – jar dependencies
I created a jar in Java 6 Now I'm creating a publishing document and recording dependencies How to find the earliest version of Java that can successfully run jar and compile the source code into jar?
Solution
I only know one Manuel solution: try it However, there are two things to consider
>Which version of the code language is compatible? > Which JRE will it execute?
You can use the current JDK for the first operation by simply traversing the - source and - target parameters passed to the javac compiler However, this does not prevent you from using the classes and methods in the JDK you are using If you do, if you are using a class or method that does not exist at that time, the code will not execute against the lower JRE
The most surprising way is to install all the different jdks and try to compile the code with each compiler