How can I suppress java compiler warnings about Sun proprietary API

tomdee picture tomdee · Jul 16, 2009 · Viewed 21.8k times · Source

I'm using the encode() method from the sun.misc.BASE64Encoder package. How do I suppress the compiler warnings that it generates?

sun.misc.BASE64Encoder is Sun proprietary API and may be removed in

And as a followup, why don't I see this warning in Eclipse?

Answer

Michael Chaves picture Michael Chaves · Mar 5, 2012

There is a totally undocumented way to suppress the sun proprietary API warnings! Add -XDignore.symbol.file to the javac command line.

I found this at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6476630 (scroll all the way to the very last comment). We all need to think kind thoughts about "xfournet" who added that last comment!