Search code examples
classloaderjavadynamic-class-loaders

Concept of JDK ,why it is design like this


As per the the JAVA ,java is an open source thats why it provides the API's so that vendors can write their own implementation/concrete classes for that API . so as the java it obeys open source so I ' just thinking why do they not provide API for jdk why they provide concrete classes as part of JDK ?


Solution

  • The term Java is heavily overloaded when talking about Java as a development platform.

    The core Java platform is defined through the Java Community Process (JCP), which creates many Java Specification Requests (JSRs) covering different aspects of Java functionality (this includes Java ME, Java SE and Java EE as well as several other, ancillary, things). Each version of Java has its own JSR; in the case of JDK 9, this is JSR 379.

    Each JSR provides three things:

    1. A specification, which in this case has three parts that precisely define the Java platform: the Java Language Specification (JLS), the Java Virtual Machine specification (JVMS) and the standard class library definition (API docs).
    2. A Reference Implementation (RI). This is a proof, if you like, that the specification can be implemented. In the case of Java SE, this is the OpenJDK project (this was what Sun Microsystems open sourced back in 2007). This, however, is just the source code, different people use this to build binary distributions (Oracle, Azul, Red Hat, etc).
    3. A Technology Compatability Kit (TCK). This is used by people who want to develop an independent implementation of the specification to verify that what they write conforms to the spec. People like IBM and Azul use this for the J9 and Zing JVMs.

    To answer your question, the Java SE JSR provides a definition of the APIs, OpenJDK provides an open source implementation of those APIs and several companies then create binary distributions of those APIs.