Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Reliability of Java source

 
whippersnapper
Posts: 1843
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Back in this old thread I wrote, regarding the Java source code files that come with the SDK:
MM:
I think there's some disclaimer from Sun that they don't guarantee that the source code provided is what they actually compile into Java, but that it's some "typical" implementation.

And Marilyn replied:
MdQ:
I've heard others say that, but I've never seen any disclaimer like that.

I did find what I think I was basing my assertion on in the readme.html file that comes with the SDK.
From that document:


Source Code
(In src.zip.) Java programming language source files for all classes that make up the Java 2 core API (that is, sources files for the java.*, javax.* and some org.* packages, but not for com.sun.* packages). This source code is provided for informational purposes only, to help developers learn and use the Java programming language. These files do not include platform-specific implementation code and cannot be used to rebuild the class libraries. To extract these file, use any common zip utility. Or, you may use the Jar utility in the Java 2 SDK's bin directory:
jar xvf src.zip


So I *was* overstating the case.
I think when I read some previous version of this statement some time ago I mistakenly combined "for informational purposes only" and "cannot be used to rebuild the class libraries" into "is not guaranteed to be the actual source." Plus hearing others make the same false conclusion and claims as I did probably just reinforced the error.
So there we have it! It's the real source, but you don't have everything you need to compile it all into Java. (And of course we should all code to the API as specified in documentation and not to source we read, because the implementation could always change in future releases.)
 
Sheriff
Posts: 9105
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the update, Michael
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic