Source code

The JDK's source code, pre-Java 9, has the following basic organizational schema:

    source code / [shared, OS-specific] / [classes / native] / Java API     package name / [.file extension]

Let's look at this a bit closer. After the source code, we have two options. If the code is cross-platform, then it is a shared directory; otherwise, it is operating system specific. For example:

    src/share/...    src/windows/...

Next, we have the classes directory or a native language directory. For example:

    src/share/classes/...    src/share/classes/java/...

Next, we have the name of the Java API package followed by the file extension. The file extensions depend on content such as .java, .c, and more.

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.