0

I've learned that Java EE is a standard. But when I tried to read open source code, I often failed to get the source code for Java EE.

So I want to ask : Did Sun write code for JavaEE?

If Sun did it, where can I get source code for the APIs?

If not, does that mean "any implementation should write his own JavaEE APIs first"?

2 Answers2

1

Not only is JavaEE a standard, it is merely a specification. To get any source code, you need to inspect an existing implementation. It is usually helpful to get the source code for the Java EE container you decide to use, if you can. If you are writing an implementation yourself, then I'll leave that with you.

Right at the bottom of the JavaEE Downloads Page, there is a link to download the source code of GlassFish, Oracle's reference implementation of JavaEE. (Sun is Oracle now)

Lee Kowalkowski
  • 11,591
  • 3
  • 40
  • 46
  • So, do you mean, when I am writing a JavaEE container, I have to write the api myself ? – ForbetterCoder Feb 25 '12 at 09:37
  • Yeah, but why not just use GlassFish or whatever? – Lee Kowalkowski Feb 25 '12 at 12:48
  • Thanks !I am reading code implementing part of JavaEE spec, like Tomcat and Apache ActiveMQ. And when I try to read the comment of some interfaces, Eclipse fails to attach it.So I want to find the source of these interfaces and that's why I ask this question. It's weird , Oracle just gave the spec but didn't write the code of APIs, that's almost the same! – ForbetterCoder Feb 26 '12 at 05:32
0

For plain APIs, the ones that were likely used to generate the Javadocs you can view online from Oracle (formerly Sun) pages, you could dig them out from the central Maven repository using the artifact names provided here.

One of related questions: Where can I find JavaEE packages' sources?

Community
  • 1
  • 1
MaDa
  • 10,511
  • 9
  • 46
  • 84
  • But I need more than plain APIs, I need the comments of APIs so that I can write code with Eclipse without opening the javadoc files in another application. – ForbetterCoder Feb 26 '12 at 05:31
  • @ForbetterCoder Did you look at the source packages then? There they are. – MaDa Feb 26 '12 at 06:34