Create simple Test.java
public class Test {
public static void main(String[] args) {
}
}
Have JDK 7 installed
try javac -target 1.6 Test.java
FAIL: javac: target release 1.6 conflicts with default source release 1.7
try javac -target 1.6 -source 1.6 Test.java
Success.
The same when you try to use -target 1.5 or -target 1.4.2
public class Test {
public static void main(String[] args) {
}
}
Have JDK 7 installed
try javac -target 1.6 Test.java
FAIL: javac: target release 1.6 conflicts with default source release 1.7
try javac -target 1.6 -source 1.6 Test.java
Success.
The same when you try to use -target 1.5 or -target 1.4.2
- relates to
-
JDK-6900037 javac should warn if earlier -source is used and bootclasspath not set
-
- Closed
-