How to make JEE6 javadoc work for a regular JavaSE project in NetBeans 7.0.1?

All I want is the JavaEE6 documentation displayed in my JavaSE project. Perhaps this is not possible.

The problem is that I created a simple JavaSE project (i.e. New Project β†’ Java β†’ 'Java Application') in NetBeans, but I have Java Enterprise Edition elements in it.

One of these elements is the javax.persistence @Basic annotation (fetch / optional).

- When I press ctrl + space in this annotation, NetBeans says: " Javadoc not found. ". When I use Alt + F1 ( Right-click β†’ "Show Javadoc" ), the status bar says: " Cannot run Show Javadoc here . '.

Additional Information:

1) netbeans_installation_dir \ NetBeans 7.0.1 \ enterprise \ docs contains the required API documentation file ( javaee6-doc-api.zip ).

2) I looked at stackoverflow for similar solutions, but they didn’t work for me - adding .jar / .zip / folder to the library or through 'Tools β†’ Java Platforms β†’ Javadoc Tab ” do not work.

It is very strange when I add javaEE6.jar to the Javadoc tab of the JDK6 platform, and in the Project Structure window, I directly click on the JDK1.6 library with the Show Javadoc library, a browser window opens and I see the JEE6 documentation as I wanted.

I assume the problem is that I have a regular JavaSE project and NetBeans cannot get JavaEE6 javadoc because it does not know that my application partially uses EE elements. This is probably also due to the fact that this documentation is intended for JavaEE6 applications (therefore, it is located under the / enterprise folder).

So I don’t know how to fix it. This is mistake? (I read in the NetBeans bug report that this might be a possible bug).

+4
source share
1 answer

This seems like a problem with how you attach the library to the project. The easiest way to do this is to use the libraries available in Tools> Libraries. You just need to make sure the library that you attach to your project has the correct Javadoc. If Javadoc is not connected, you can try the following:

  • In the NetBeans IDE, go to Tools> Libraries.
  • Select the desired library and select the Javadoc tab.
  • Click "Add ZIP / Folder" and find where your Javadoc project is located.
  • Specify a ZIP or Javadoc folder and click "Add ZIP / Folder".
  • Click OK to close the library manager.

More information can be found on [this NetBeans Wiki page] [1].

0
source

All Articles