Kelly,

We're trying to change the default values for the -source and -target options in javac.

I'm trying to understand two settings in the jdk build:

jdk/make/common/shared/Defs-control.gmk
This file sets TARGET_CLASS_VERSION to 5, without having a matching
setting of LANGUAGE_VERSION.

jdk/make/common/shared/Defs-java.gmk
This file sets TARGET_CLASS_VERSION to 5, and correctly has a matching
setting of LANGUAGE_VERSION.

What is the difference between the settings in those two files? In other words,
who uses each one?

Also, I note the following:

make/Defs-internal.gmk
This file passes on the value of TARGET_CLASS_VERSION but does not pass
on a corresponding version of LANGUAGE_VERSION.

As a general rule, anyone setting javac's -target flag should normally always be setting a corresponding -source flag as well. The target value can be bigger (newer) than the source value, but it is an error for the target to be less than the source value. Setting one but not the other opens oneself up to the possibility of errors when the
default values change.

-- Jon

Reply via email to