Option Meaning Proposal
-attrparseonly Stop compiler pipeline at Attr. Remove (Overlaps with shouldStopXYZ)
-checkclassfile Performs misc sanity checks when reading a class - i.e. unknown attribute names, etc. Remove (it's only used in two places)
compilePolicy Switch for selecting how javac should advance classes in the compiler pipeline Keep
completionDeps Enable completion dependency. Keep (used in tests and by sjavac)
complexinference Used in JSR14 to enable target-typing in method context Remove (unused and overhauled in JDK 8)
debugcode Used to dump several info while generating Code attribute Keep (seems useful)
debuglower Used to dump extra info during Lower Remove (only used in two minor places) or consolidate with other debug options
debugresolve Issues extra accessibility errors during Resolve Remove (obscure and no test is using it)
debugstackmap Used to dump several info while generating stack maps Keep (seems useful) - perhaps consolidate with debugcode
dev Dump hidden assertions/stack traces thrown by javac Keep
diags Set diagnostic layout on the diagnostic formatter; for instance short diagnostics can be selected with -XDdiags=short, or rich diagnostic formatter features can be selectively turned on and off Keep (consolidate under formatter options?)
diagsFormat Legacy option to specify diagnostic layout using a printf-like string e.g. -XDdiagsFormat=%b:%l:%_%m Keep (used in tests)
diagsIndentation Sets indentation on javac diagnostics Keep (seems useful maybe for IDEs/clients?)
displayFilerState Display debug info for JavacFiler Remove or Consolidate with other debug options
dumpInferenceGraphsTo Dump inference graphs (as dot files) in a given folder Consolidate with other debug options?
dumpLambdaToMethodStats Dump information on which metafactory (and static args) have been selected for a given lambda capture Used in tests. Consolidate with other debug options?
dumpmodifiers Dump class, method, field flags during classfile generation Keep. Consolidate with other debug options?
enableSunApiLintControl Allow warnings about usages of propietary API to be suppressed (a la Xlint) Remove (seems obsolete - and possibly at odds with Jigsaw?). Tests use this
expectKeys generate additional log messages as to whether certain diagnostics have been found or not during compilation Discuss - potentially useful - but effectively unused.
failcomplete throw an error if a given class (whose name can be passed on the command line) is completed by javac Keep (useful for testing completion)
fatalEnterError alter meaning of recoverable errors during annotation processing Discuss - possibly useful for testing, but used only once
find enables finder mode (i.e. diamond finder) Keep
forceSerializable force all lambdas to be treated as serializable Remove (I think this was used during early testing of LambdaToMethod?)
ignore.symbol.file ignores ct.sym Keep (even with Jigsaw, we probably need this when compiling with -source 7/8?)
invokedynamic allow invokedynamic on targets < 7 Remove (transitional flag)
javah:full alter javah header generation Discuss
jsrlimit alter code generation (jsr) in try/catch/finally Remove. This is effectively unused since stackmaps have been enabled by default.
multilinePolicy Alter the way in which composite diagnostics gets printed by formatters Keep. Consolidate with other formatter options?
oldDiags Transitional flag that disables the rich diagnostic formatter Keep. Consolidate with other formatter options?
onlySyntaxErrorsUnrecoverable alter meaning of recoverable errors during annotation processing Discuss - possibly useful for testing - I remember it being used in JCK test runs
-printflat dump lowered tree to file Remove (same as printsource)
process.packages disable annotations processing on packages Discuss (possibly useful for tesing)
procloader allow custom ClassLoaders to be used in BaseFileManager.getClassLoader Keep (potentially used in the wild)
rawDiagnostics disable localization of log messages Keep
-relax Disable check that all abstract methods should be implemented Remove (unused)
-retrofit Disable check that all abstract methods should be implemented Remove (identical to -relax)
save-parameter-names keep track of parameter names in LocalVariableTable and MethodParameters when reading the class Remove (behavior is already dependent on MethodParameters)
-scramble obfuscate the bytecode by mangling field and method names (only private) Remove
-scrambleAll obfuscate the bytecode by mangling field and method names (all) Remove
shouldStopPolicy override default javac behavior and stop at given stage Consolidate
shouldStopPolicyIfError override default javac behavior and stop at given stage Consolidate
shouldStopPolicyIfNoError override default javac behavior and stop at given stage Consolidate
showCaret enable/disable caret in diagnostic formatting Keep. Consolidate with other formatter options?
showClass display the location and checksum of a given class Discuss
showResolveErrors Show (temporary?) resolution errors during annotation processing Discuss
sortFiles sort the output of JavaFileManager.list Keep (useful to debug platform dependent issues)
showSource enable/disable source name in diagnostic formatting Keep. Consolidate with other formatter options?
sourcePosition enable/disable source position in diagnostic formatting Keep. Consolidate with other formatter options?
stdout force log to dump to System.out Keep
-stubs dump lowered tree to file Remove (same as printsource)
suppressAbortOnBadClassFile Suppress error on certain completion errors Remove (partial and unused).
suppressNotes Suppress log notes Keep (used in tests)
useBeforeDeclarationWarning generate additional forward references warnings where the JLS is ok Remove/turn into a Lint category?
useUnsharedTable Swap name table implementation Keep
verboseCompilePolicy Dump extra info about what javac is doing (i.e. which file is compiling - at which phase it is, etc.) Keep
verboseResolution Dump extra resolution diagnostics Keep (used in test harness). Consolidate with other debugging options?
warnOnAccessToSensitiveMembers Warn when serializable lambda access certain members i.e. fields of non-serializable classes Turn into Lint (and maybe generalize?)
warnOnSyntheticConflicts turn errors about synthetic name clashes into warnings Remove