2

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

Doc Holiday
  • 9,928
  • 32
  • 98
  • 151
  • 2
    See here: [oracle blog about using older sources causing that warning](https://blogs.oracle.com/darcy/entry/bootclasspath_older_source) – ARC Jan 02 '13 at 14:26
  • thanks I just ran into the same problem wondering what that meant... now I am installing JDK 6 (in addition to 7) in order to compile for that one. Thanks. – Till Kolditz Apr 24 '13 at 12:33
  • This question closed, but duplicate has 9 points ... http://stackoverflow.com/questions/7816423/warning-options-bootstrap-class-path-not-set-in-conjunction-with-source-1-5 – cmcginty May 16 '13 at 00:01

1 Answers1

2

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.

Community
  • 1
  • 1
ARC
  • 352
  • 4
  • 13