Suppress javac warning “…is internal proprietary API and may be removed in a future release”

This particular warning cannot be suppressed. At least not officially.

The warning about proprietary API means that you should not
use the API which causes the warning. Sun does not support
such API and the warning will not be suppressible.

If you’re particularly determined, you can use the highly undocumented javac -XDignore.symbol.file flag which will compile your program against Sun’s internal rt.jar rather than the public-facing symbol file ct.sym. rt.jar doesn’t produce this warning.

Leave a Comment