Sunday, November 24, 2013

Java Source for JDK classes in JDeveloper 12c

If you try to open standard Java class from JDK in JDeveloper 12c, you will notice that it does not open Source.

This happens as there is no JDK 7 source included in default installation. You can see this by using Tools - Manage Libraries menu. Select Java SE Definitions tab, you will notice there is no Source Path.

You can first download JDK 7 Source from Download file and place it in oracle_common/jdk folder as shown below.

Now go back to JDeveloper. Go to Java SE Definitions under Tools - Manage Libraries. Select 1.7.* definition under User (not under Extension), and add to Source Path. JDK definition under Extension is Read Only, but when you restart JDeveloper after this change, Source Path will be updated for Extension JDK as well.

Now restart JDeveloper. You will now see source for JDK 7 java classes.