Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find the JDK 1.5 source code? [closed]

Tags:

java

jdk1.5

Where can I find the entire source code for JDK 1.5 to download? I am unable to find the exact link on the oracle site; the link provided only goes in circles.

like image 499
hakish Avatar asked Jan 19 '12 15:01

hakish


2 Answers

The name Java can be applied to many different components that work together. It might mean the "Java Virtual Machine" to some, the "Java Language Specification" to others, "Java compilers" to many, and "Java language libraries" to quite a few.

If you want the source code to the Java virtual machine (JVM) for Java5, it is available; but, not under an open source license. The first "open source" copy of Java was released with "Java 6". If you want Java5 source code, you needed to sign up for a "Java Researcher License Agreement" which provided you access to the source code for the JVM for (at least Java5). Having the source code of the JVM is completely unnecessary in writing code for the Java5 environment.

If you want the source code for the Java Language Specification for Java5, it is a text document (typically published as a book or on-line set of web pages). While it might allow you to understand if a compiler should complain with an error under certain circumstances, again it is not necessary to write a program for the Java5 environment.

If you want the Java5 compiler, it can be downloaded in the oracle archives of old releases of the Java development toolkit. If you want write a program for Java5, downloading and using this offering is generally best-practice for developing Java5 programs. Alternatively you may configured a compatible compatible compiler (Java6 / Java7) to emit Java5 code.

If you want the Java5 language libraries, they are included with the Java5 development kit. The Java6 and Java7 development kit offerings provide language libraries that go to great efforts to be compatible with Java5 source code; however, newer libraries also include newer features and operations which a stock Java5 virtual machine will not be able to reference. Again, there are techniques to safely use a backwards-compatible version of Java (6/7); however, one doesn't need to apply any extra care if they base their development off a Java5 development kit. The "source code" for the language libraries was included in the source code for the JVM under the Java Research License Agreement, to the degree that SUN was allowed to include such source code.

While SUN has licensed a number of technologies from other companies in a manner where they can be freely distributed with Java5, SUN did not necessarily own all of the technologies in Java5 outright. As such, even under the Java Researcher License Agreement, some of the source code is not available (although the compiled libraries are). Open source projects (like OpenJDK) were quick to implement these missing "holes" with open-source libraries to get a fully functional open-source Java stack; but, that is Java6+ (not Java5).

like image 180
Edwin Buck Avatar answered Sep 21 '22 23:09

Edwin Buck


Java 1.5 is not open source. Quoting Wikipedia:

On November 13, 2006, Sun released much of Java as free and open source software, (FOSS), under the terms of the GNU General Public License (GPL). On May 8, 2007, Sun finished the process, making all of Java's core code available under free software/open-source distribution terms, aside from a small portion of code to which Sun did not hold the copyright.

As far as I can remember it was possible to get the source code for research purposes (our university had access to the source code with a special agreement with Sun) but I don't think that it will be possible to get it from Oracle.

Before the open sourcing there were several free implementation of the JVM and of the core classes. Look at http://en.wikipedia.org/wiki/Free_Java_implementations for examples.

like image 41
Matteo Avatar answered Sep 20 '22 23:09

Matteo