Hello all my work laptop crashed and I had to install programs on a loaner.
I am running
*Eclipse Juno
*JRE7
*jdk1.7.0_10
When I try to compile an app..I get
warning: [options] bootstrap class path not set in conjunction with -source 1.6
Hello all my work laptop crashed and I had to install programs on a loaner.
I am running
*Eclipse Juno
*JRE7
*jdk1.7.0_10
When I try to compile an app..I get
warning: [options] bootstrap class path not set in conjunction with -source 1.6
Copied from oracle blog about using older sources causing this warning
To use javac from JDK N to cross-compiler to an older platform version, the correct practice is to:
Use the older -source setting.
Set the bootclasspath to compile against the rt.jar (or equivalent) for the older platform.
If the second step is not taken, javac will dutifully use the old language rules combined with new libraries, which can result in class files that do not work on the older platform since references to non-existent methods can get included.
Thanks to work by Jon Gibbons, in JDK 7 build 121 and later javac detects and warns about this suspicious situation; for example:
$ javac -source 6 HelloWorld.java
warning: [options] bootstrap class path not set in conjunction with -source 1.6
One way to address the warning is to set the bootclasspath. If that is inappropriate, the warning can be disabled with a new suboption within the -Xlint family, -Xlint:-options.
With this change, a likely problematic combination of options to javac that can lead to subtle build errors are diagnosed by the compiler and can easily by either directly addressed, or documented as part of the build process via the new -Xlint suboption.