3

I want to see the source code of sun.nio.ch.SocketChannelImpl#read function. But there's no corresponding source in src.zip of Oracle's JDK.

I know I can see it from the OpenJDK's openjdk-6-src-b27-26_oct_2012.tar.gz downloaded from http://download.java.net/openjdk/jdk6/.

But does it mean that I can't get it from the more popular non-open JDK because it's not open source? Or I'm missing something and I actually can get it from Oracle JDK?(I don't know much of the difference of JDK and OpenJDK)


Update:
I don't understand why Oracle didn't include all the sources in src.zip since one can get it from OpenJDK. What do they want to hide? I think if any source if not in the src.zip, it means that Oracle use "some closed source third party components" or "commercial features" for that. Right?

Quote from https://blogs.oracle.com/henrik/entry/java_7_questions_answers:

" Q: Where can I find the source code? A: The source code for the Java SE 7 Reference Implementation is available from the JDK 7 Project in the OpenJDK Community.

Q: What is the difference between the source code found in the OpenJDK repository, and the code you use to build the Oracle JDK? A: It is very close - our build process for Oracle JDK releases builds on OpenJDK 7 by adding just a couple of pieces, like the deployment code, which includes Oracle's implementation of the Java Plugin and Java WebStart, as well as some closed source third party components like a graphics rasterizer, some open source third party components, like Rhino, and a few bits and pieces here and there, like additional documentation or third party fonts. Moving forward, our intent is to open source all pieces of the Oracle JDK except those that we consider commercial features such as JRockit Mission Control (not yet available in Oracle JDK), and replace encumbered third party components with open source alternatives to achieve closer parity between the code bases."

Peanut
  • 3,753
  • 3
  • 31
  • 45
duleshi
  • 1,966
  • 2
  • 21
  • 32
  • 2
    if you are going to know differences check this [post][1] [1]: http://stackoverflow.com/questions/11547458/what-is-differences-between-jvm-jdk-jre-openjdk – Super Hornet Aug 14 '13 at 07:57
  • possible duplicate of [Java SE 6 vs. JRE 1.6 vs. JDK 1.6 - What do these mean?](http://stackoverflow.com/questions/250517/java-se-6-vs-jre-1-6-vs-jdk-1-6-what-do-these-mean) – Jayan Aug 14 '13 at 07:59
  • @Jayan I don't think it's a dup. That one has nothing to do with mine. I'm not asking about difference between jdk and jre. It's more about jdk and open jdk. – duleshi Aug 14 '13 at 08:39

1 Answers1

0

Even you find source in src.zip, it does not mean it is open source. OpenSource is more about licensing. You should visit appropriate license agreement at owners site. See a detailed discussion https://softwareengineering.stackexchange.com/questions/52534/can-we-use-java-for-commercial-use

In this case., IMHO, license is GNU General Public License version 2.

Community
  • 1
  • 1
Jayan
  • 18,003
  • 15
  • 89
  • 143