Search code examples
jpanetbeanseclipselinkjavadoc

Netbeans, get the right javadoc for EclipseLink


  • In Netbeans 7.2.1 i've created a new java project
  • In the project properties, in the libraries section, i've added "EclipseLink (JPA 2.0)" that is a library that ships with Netbeans (at least with this version).

But javadoc isn't provided so, for example, when i try to instantiate an EntityManagerFactory:

Persistence.createEntityManagerFactory(String string Map map)

i can't get support, so eventually i don't know what i am expected to pass into the map argument.

How can i determine the correct javadoc file/s to add and where can i find it?

Solution attempt 1

As far as i can see, there is no reference to the url of the project inside the library, so you are supposed to get this information in other places.
Once i've got the information (http://www.eclipse.org/eclipselink/api/2.5/index.html), i downloaded the zip file and i put in a local directory:

/home/homersimpson/NetBeansLibraries/EclipseLink (JPA 2.0)/eclipselink-javadocs.zip 

Then, in NetBeans Ant Libraries, i've added, for the "EclipseLink (JPA 2.0)" the zip file to the sources.

I still cannot get help for class: javax.persistence.Persistence

but in the .zip file i have:

javax/persistence/Persistence.html


Solution

  • I assume NetBeans needs to source to show you the java docs. So ensure you include the source code jar for JPA.

    For online java docs see, http://www.eclipse.org/eclipselink/api/2.5/index.html