I considered the question of whether a java project can create 2 jars: one for java7 and one for java6, yes, the source code can use some some new functions of java7.
so to generate java6 jar command line will look like this:
javac -target 1.6 -bootclasspath jdk1.6.0\lib\rt.jar -extdirs "" MyApp.java
Unfortunately, He just emits an error:
javac: target release 1.6 conflicts with default source release 1.7
According to this document , it should be possible for jdk6 vs jdk5, does anyone know why it does not work in jdk7 vs jdk6? Am I doing something wrong or is it officially not officially supported?
Thank.
source
share