Evans Y.
Evans Y.

Reputation: 4419

source code/docs for sun.misc.*

I came across the sum.misc.Unsafe class when reading the implementation of ForkJoinPool. But no source code or api docs were found in the JDK.

Where can I find the source code or api docs for the sun.misc.*

Upvotes: 4

Views: 2424

Answers (2)

Edwin Buck
Edwin Buck

Reputation: 70909

While such code is available (see Binyamin's post) it is generally a very bad idea to write anything that needs such code.

First, you are not generally assured that any JVM has such a class available (only JVMs descending from SUN's codebase would contain non-published, non-standard, SUN specific libraries). Also, since these are not standard libraries, you can't really depend on them being present or unchanged in subsequent releases of the SUN JVM.

Upvotes: 2

MByD
MByD

Reputation: 137322

For Java source code, I usually go to GrepCode

Upvotes: 8

Related Questions