Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to get full source code for rt.jar? [closed]

Tags:

java

I am searching the source code for rt.jar for Oracle JRE/JDK 6 Update 22. The src.zip, which is included with the delivery, does not contain all sources, for examples the sun.* (e.g. sun.reflect.Reflection) packages are missing.

Where can I get a complete src.zip?

like image 389
MRalwasser Avatar asked Dec 07 '10 16:12

MRalwasser


2 Answers

sun.* sources are a part of JDK that is proprietary closed source Sun code (or Oracle since 2010).

Having said that, the package you're interested in (sun.reflect.) happens to be included in OpenJDK 7, and all of OpenJDK source is open.

You can get the source here: http://jdk7src.sourceforge.net/

like image 154
rustyx Avatar answered Sep 21 '22 16:09

rustyx


EDIT 2017-11-22:

This answer was written in 2010 where the world was very different. If you just need the sources for the JRE classes, use the JRE in a JDK build - the included src.zip file is recognized by most modern IDE's.

If you really, really need the full source (if you are unsure, you don't) then find a suitable OpenJDK debug build or build OpenJDK from source.


OLD 2010 ANSWER:

You can download the complete source code for the JDK from http://download.java.net/jdk6/source/

VERY IMPORTANT NOTE: This is under the Java Research License, which may taint you in a way incompatible with what you need to know this for.

like image 34
Thorbjørn Ravn Andersen Avatar answered Sep 24 '22 16:09

Thorbjørn Ravn Andersen