Why is sun.misc disappointed to use?

I used BASE64Encoder () and BASE64Decoder () in sun.misc, first im using eclipse, and I had to turn to warnings, since access to them is limited by default.

The classes work fine, but during my work with this, I read a lot of places where you can’t use sun.misc at all, but as a rule, no one indicates the correct reason.

So, Should I stay away from sun.misc and why?

+2
java base64 package
source share
1 answer

There are no promises to continue supporting these classes; they may be removed from the JDK without warning on any release.

In addition, not all JDKs have these classes, so your code may not work on all platforms, which contradicts the intention of java to "compile once, run anywhere."

+5
source share

All Articles