Seeing source code of sun.misc which is part of rt.jar

170 views Asked by At

I was checking LockSupport.class (from eclipse, which is part of rt.jar) and came to know this class internally uses sun.misc.Unsafe for its implementation.

In general, for most of the packages which are present in rt.jar, I can see the source, for example can see LockSupport.class , String.class (and see their code).

However, when I tried to see sun.misc.Unsafe, it didn't show anything. I see a similar question on SO here - old question with same doubt. Of course , experts suggested to use GrepCode. However, my question is why can't we see the source when we can see for other packages in rt.jar?

In the same SO question, it was suggested not to rely upon sun.misc.*, but it is still widely used.

How can I see the exact code which is applicable for a specific JDK?

0

There are 0 answers