I have Java SE 1.7.
javac = 1.7.0_79
java version = "1.7.0_79"
Eclipse = Luna.
I want to compile at 1.6 level. I use an Ant build script.
Ant record directive. Output below:
'-target'
'1.6'
'-g'
'-source'
'1.6'
...
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 warning
I get following error:
Unsupported major.minor version 51.0
javac -target 1.6 -source 1.6 at command line works as expected.
The following answers this question:
Get the rt.jar from your final destination machine. bootclasspath must point to this rt.jar, somehow.