In JDK 8, a new command-line tool, jdeps, is added that developers can use to understand the static dependencies of their applications and libraries. It also provides an -jdkinternals option to find dependencies to any JDK internal APIs that are unsupported and private to JDK implementation (see Why Developers Should Not Write Programs That Call 'sun' Packages).
Below lists some of the JDK internal APIs and the recommended way to replace their usage.
|JDK internal API||Supported API||Note|
|sun.reflect.Reflection.getCallerClass||TBD||A JEP will be submitted to define a supported API for JDK 9|