Is there a compiler option for javac to compile without notes?
I know of:
-nowarn
: to not display warnings -g:none
: to generate no debugging infoNotes are still generated with both of these. Is there a compiler option to not generate notes, too?
By 'notes' I mean compiler output such as:
Note: Exercise.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
I use javac 1.7.0_40
.
Not really an javac option, but worth to mention...
If you don't want to display any compilation output.
in unix: javac ... > /dev/null
in windows: javac ... > NUL
After some research (How can I suppress javac warnings about deprecated api?)
"From what I can tell in the docs, you can't do it on the command-line.
According to the
javac
documentation, -Xlint:none only disables warnings "not mandated by the Java Language Specification". It appears that warning you of the use of deprecated APIs is managed by the language spec.Your best option would be to fix the use of deprecated APIs. However, an option would be to add the
@SuppressWarnings("deprecation")
annotation to the classes or methods that are using the deprecated APIs."
And
"Two possible ways:
- don't use deprecated API
- Use @SuppressWarnings("deprecation")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With