Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6900037

javac should warn if earlier -source is used and bootclasspath not set

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 7
    • 7
    • tools
    • b121
    • generic
    • generic
    • Verified

      The javac compiler has long supported compiling to different source levels. However, as documented in the javac man page and written about elsewhere (http://blogs.sun.com/darcy/entry/how_to_cross_compile_for), setting the source level alone is not sufficient to generate code suitable to run on an earlier version of the platform. The bootclasspath needs to be set to the earlier platform version too.

      To help catch this situation, javac could warn if an earlier -source is used and bootclasspath is *not* set explicitly set.

            jjg Jonathan Gibbons
            darcy Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: