Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Source Code of Java

 
Ashik Uzzaman
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please forgive me if I am asking a foolish question or something that I should have known earlier as a java developer.

As far as I understand, the source code for J2SE, J2EE, J2ME API is not yet open. Is it? Or part of one these 3 APIs are open source? I understand that we can decompile he jar files and find out the source code. But is there any valid way to get the source code of those? Does Sun provide it or will provide it in future java versions?

--- Ashik
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Open source" doesn't just mean that the source code is available; it implies a license that allows you to modify and share the code (you know that, right? You respect the licenses of the software you work with, yes?)

The Java source code for virtually all of Sun's Java APIs is easily available; the J2SE API sources come with the JDK download. Installing them on Windows is an option in the installer, which you may have missed. Look in your JAVA_HOME directory for "src.zip".

The C/assembler source for Sun's JVMs, as well as some other Java goodies, are all available under a fairly liberal licensing policy. You have to agree to a license, but then you can download the source. But you're not allowed to distribute modified copies.
 
Ashik Uzzaman
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much. The src.zip file is exactly what I was looking for.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Java in General (beginners)...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic