United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6873059 Explicitly use -source 6 -target 6 when compiling with the boot jdk javac
JDK-6873059 : Explicitly use -source 6 -target 6 when compiling with the boot jdk javac

Details
Type:
Bug
Submit Date:
2009-08-18
Status:
Closed
Updated Date:
2012-10-19
Project Name:
JDK
Resolved Date:
2011-05-17
Component:
infrastructure
OS:
generic
Sub-Component:
build
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:
Backport:
Duplicate:
Relates:

Sub Tasks

Description
When compiling with different boot jdk's, the defaults for -source and -target can be different. We require a jdk6 boot jdk, so the suggested fix is to add an explicit setting of -source 6 and -target 6 when compiling with the boot jdk javac.

                                    

Comments
EVALUATION

Proposed fix from Andrew:

--- old/make/common/shared/Defs-java.gmk	2009-08-18 17:37:23.529562901 +0100
+++ new/make/common/shared/Defs-java.gmk	2009-08-18 17:37:23.342114805 +0100
@@ -201,7 +201,10 @@
 ifeq ($(JAVAC_WARNINGS_FATAL), true)
   BOOT_JAVACFLAGS  += -Werror
 endif
-BOOT_JAVACFLAGS  += -encoding ascii
+
+BOOT_SOURCE_LANGUAGE_VERSION = 6
+BOOT_TARGET_CLASS_VERSION = 6
+BOOT_JAVACFLAGS  += -encoding ascii -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
 BOOT_JAR_JFLAGS += $(JAR_JFLAGS)
 
 BOOT_JAVACFLAGS  += $(NO_PROPRIETARY_API_WARNINGS)
                                     
2009-08-18
EVALUATION

See
http://hg.openjdk.java.net/jdk7/jdk7/jdk/log?rev=6873059
http://hg.openjdk.java.net/jdk7/jdk7/corba/log?rev=6873059
http://hg.openjdk.java.net/jdk7/jdk7/langtools/log?rev=6873059

Hotspot not done just yet (as of 9/3/2009)
                                     
2009-09-03
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/0fc81f0a8ca8
                                     
2009-09-13
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/0fc81f0a8ca8
                                     
2009-09-25



Hardware and Software, Engineered to Work Together