diff -r 5f0731e4e5e6 -r 475eb15dfdad src/share/classes/com/sun/tools/javac/main/Option.java --- a/src/share/classes/com/sun/tools/javac/main/Option.java Mon Jan 21 00:45:35 2013 -0500 +++ b/src/share/classes/com/sun/tools/javac/main/Option.java Mon Jan 21 01:27:42 2013 -0500 @@ -40,6 +40,7 @@ import com.sun.tools.javac.code.Lint; import com.sun.tools.javac.code.Source; import com.sun.tools.javac.code.Type; +import com.sun.tools.javac.jvm.Profile; import com.sun.tools.javac.jvm.Target; import com.sun.tools.javac.processing.JavacProcessingEnvironment; import com.sun.tools.javac.util.Log; @@ -218,6 +219,18 @@ } }, + PROFILE("-profile", "opt.arg.profile", "opt.profile", STANDARD, BASIC) { + @Override + public boolean process(OptionHelper helper, String option, String operand) { + Profile profile = Profile.lookup(operand); + if (profile == null) { + helper.error("err.invalid.profile", operand); + return true; + } + return super.process(helper, option, operand); + } + }, + VERSION("-version", "opt.version", STANDARD, INFO) { @Override public boolean process(OptionHelper helper, String option) {