1.1 --- a/src/share/classes/com/sun/tools/javac/main/Option.java Mon Jan 21 00:45:35 2013 -0500 1.2 +++ b/src/share/classes/com/sun/tools/javac/main/Option.java Mon Jan 21 01:27:42 2013 -0500 1.3 @@ -40,6 +40,7 @@ 1.4 import com.sun.tools.javac.code.Lint; 1.5 import com.sun.tools.javac.code.Source; 1.6 import com.sun.tools.javac.code.Type; 1.7 +import com.sun.tools.javac.jvm.Profile; 1.8 import com.sun.tools.javac.jvm.Target; 1.9 import com.sun.tools.javac.processing.JavacProcessingEnvironment; 1.10 import com.sun.tools.javac.util.Log; 1.11 @@ -218,6 +219,18 @@ 1.12 } 1.13 }, 1.14 1.15 + PROFILE("-profile", "opt.arg.profile", "opt.profile", STANDARD, BASIC) { 1.16 + @Override 1.17 + public boolean process(OptionHelper helper, String option, String operand) { 1.18 + Profile profile = Profile.lookup(operand); 1.19 + if (profile == null) { 1.20 + helper.error("err.invalid.profile", operand); 1.21 + return true; 1.22 + } 1.23 + return super.process(helper, option, operand); 1.24 + } 1.25 + }, 1.26 + 1.27 VERSION("-version", "opt.version", STANDARD, INFO) { 1.28 @Override 1.29 public boolean process(OptionHelper helper, String option) {