JDK-6900037 : javac should warn if earlier -source is used and bootclasspath not set
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-11-11
  • Updated: 2017-05-16
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b121Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
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.

Comments
EVALUATION Suggest -Xlint:options
10-11-2010

EVALUATION Maybe include this under -Xlint:paths
02-09-2010