String sourceString = options.get("-source");
Source source = (sourceString != null)
? Source.lookup(sourceString)
: Source.JDK1_5; // JDK 5 is the latest supported source version
String targetString = options.get("-target");
Target target = (targetString != null)
? Target.lookup(targetString)
: Target.JDK1_5; // JDK 5 is the latest supported source version
// We don't check source/target consistency for CLDC, as J2ME
// profiles are not aligned with J2SE targets; moreover, a
// single CLDC target may have many profiles. In addition,
// this is needed for the continued functioning of the JSR14
// prototype.
if (Character.isDigit(target.name.charAt(0)) &&
target.compareTo(source.requiredTarget()) < 0) {
if (targetString != null) {
if (sourceString == null) {
warning("warn.target.default.source.conflict",
targetString,
source.requiredTarget().name);