There are JLS (and JVMS) defining the "core" java. There are also a lot of JSRs extending its functionality. But is there a specifications for Java's standard library like java.lang
?
The closest I found is Java™ Platform, Standard Edition 8 API Specification, but it feels more like documentation rather than specification. Is this doc the official spec for java standard library APIs? Do vendors other than oracle (like AdoptOpenJdk, etc) read this doc-like spec and implement their version of JRE? Or there is another more "formal/official" spec?
Yes, the Java Doc comments define the official API specification, as per their statement:
Our documentation comments define the official Java Platform API Specification
There is no other "more official" documentation for the Java API. They elaborate more on using Java Docs as specification in the linked article:
There are commonly two different ways to write doc comments -- as API specifications, or as programming guide documentation. These two targets are described in the following sections. A staff with generous resources can afford to blend both into the same documentation (properly "chunked"); however, our priorities dictate that we give prime focus to writing API specifications in doc comments. This is why developers often need to turn to other documents, such as Java SE Technical Documentation and The Java Tutorials for programming guides
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With