Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find JavaEE packages' sources? [closed]

I'm developing a JavaEE system (distributed on Weblogic App Server), but I don't have the sources for the JavaEE packages (javax.ejb.*, for instance).

Where can I find the sources (not javadoc) for these packages?

like image 445
wafwaf Avatar asked Sep 27 '11 13:09

wafwaf


People also ask

Where are Java packages located?

The classes belonging to the package java. awt are stored in directory " $BASE_DIR\java\awt\ " while the classes of package java. awt. event are stored in directory " $BASE_DIR\java\awt\event\ ".

Is Java no longer open source?

Java was originally developed and supported by Sun Microsystems and is now supported by Oracle. However, Java is open source and has a worldwide community invested in guiding its continued development and growth.

Where is JDK source code?

Getting the Source Code OpenJDK can be found at openjdk.java.net. The source code repositories can be downloaded and browsed at hg.openjdk.java.net/jdk8/jdk8/jdk/, hg.openjdk.java.net/jdk9/client/jdk/, and hg.openjdk.java.net/jdk10/jdk10/jdk/, respectively.

Which Java versions are still free?

Oracle JDK 17 and later is available under the Oracle No-Fee Terms and Conditions License which permits free use for all users. Oracle JDK 11, Oracle JDK Java 8, and Oracle JRE with Java Web Start in Java 8, are available to Oracle Customers via My Oracle Support and also under the OTN License Agreement for Java SE.


2 Answers

Java EE is an abstract API. It exist of just contracts (as you see in javadocs), not concrete code. The application servers are the concrete implementations. So, if you're looking for the source, you should look at the application server vendor's homepage for a source code download link. However, you're unlucky with Weblogic. It is not open source. I've never used Weblogic (I am an open source fan), so I'm not sure if the source is provided along the Weblogic license, you might want to contact Weblogic support team.

Other servers, like Tomcat, Payara, WildFly, etc are open source. WebSphere has also a "Community Edition" which is open source. You could grab the javax.* API source code from any of them, but there is no guarantee that they are exactly the same as Weblogic uses. And still then, they do not provide the concrete Weblogic implementation code (like as the code in org.apache.*, com.sun.* and org.wildfly.* packages in aforementioned open source servers).

See also:

  • What exactly is Java EE?
like image 188
BalusC Avatar answered Oct 23 '22 16:10

BalusC


Try in the default Maven repository; search for "javax.ejb", then download the source. That's quite often the easiest way, saving you from clicking through EULAs and the like.

That said, this source code is only good for plugging into an IDE to get source code completion — implementations are application-server specific (see Balusc answer).

like image 43
MaDa Avatar answered Oct 23 '22 16:10

MaDa