HttpClient javadoc jar (for netbeans 7) - netbeans

I am looking to add the javadoc (jar) for HttpClient to my IDE (Netbeans). Has anyone actually seen the jar file? or is there another way to add javadocs to Netbeans (or Eclipse).

To do this, the best way is to add a new library in the IDE and attach the Javadoc to this library. You can try the following steps to do this:
In the NetBeans IDE, go to "Tools > Libraries".
In the Library Manager, click at New Library and enter the data requested if the library don't exists
Select the library you want to add the Javadoc, and choose the Javadoc tab.
Click "Add ZIP/Folder" and browse to where your project Javadoc is located.
Specify the Javadoc ZIP or folder and click "Add ZIP/Folder".
Click "OK" to close the Library Manager.
More details can be found at this NetBeans Wiki page.
Regards

Related

How do I integrate the Java EE docs / API into Eclipse?

I want to set up my Eclipse installation so that when I use the content assist and hover over / inspect a method therein, it shows me the Java EE documentation. How do I integrate it?
You'll need to locate your documentation and your server's servlet JAR, and then add the JAR to your installed JRE and attach the documentation. This answer presumes you have already installed your server and integrated it into Eclipse.
Documentation
You can link to documentation in a few ways:
Online (e.g. http://docs.oracle.com/javaee/6/api/)
To a local JAR or ZIP file
To a local folder containing the extracted docs
Whichever way you decide, be sure you have the location handy.
Servlet JAR
You'll need to find the servlet JAR for your server setup. The JAR and its location depend on which server you use. Navigate to your server's installation directory and find the file as follows:
Tomcat: lib/servlet-api.jar
Glassfish: modules/javax.servlet-api.jar
This list is by no means exhaustive. Regardless, be sure you have the JAR's location handy also.
Add the Servlet JAR to the JRE Installation in Eclipse
Navigate to your JRE installation as follows:
In Eclipse, open the Window menu, then select Preferences.
In the search bar, type jre, and then click Installed JREs.
You can also navigate by expanding the Java tree and selecting Installed JREs.
Select the one named java, or another term like jre7.
Its type must be Standard VM.
Then, edit the installation:
Click the Edit button.
In the JRE system libraries section, click the Add External JARs... button.
Navigate to your servlet JAR and click the Open button. It appears at the bottom of the list.
Attach the Documentation
First, select your newly-added servlet JAR and click the Javadoc Location... button. The way you attach the documentation depends on its source.
Online or extracted documentation
Ensure the Javadoc URL radio button is marked (it is by default).
In the Javadoc location path field, enter or Browse for your documentation location, specifically the path containing package-list and index.html.
JAR or ZIP documentation
Ensure the Javadoc in archive radio button is marked.
In the Archive path field, enter or Browse for your full documentation path (e.g. /home/docs/jdk-6-doc.zip).
In the Path within archive field, enter or Browse for the path containing package-list and index.html (e.g. docs/api).
Finishing the Attachment
Click the Validate button to ensure everything is set correctly.
Click the OK button, then the Finish button, and finally the OK button.
Your documentation is now linked to the servlet you specified and ready for use in Eclipse. =)
References
Off-Line Java API Documentation in Eclipse?
Integrating Javadoc for Java EE 6 API into Eclipse
where is the servlet-api.jar in glassfish installation?

Eclipse does not remember external source attachments

Using Eclipse 4.3.1 (Kepler) on Ubuntu, I find that each time I exit and reenter Eclipse, I have to respecify my external source attachments. What is the key to making Eclipse remember them?
Open the Source Attachment Configuration dialog by clicking on the "Change Attached Source" button in the Class File Editor; or open the similar Java Source Attachment dialog by right-clicking on the containing jar in Package Explorer and selecting "Properties".
I've tried both.
In the dialog, click on the "External File" button and navigate to a jar containing sources, or click on the "External Folder" button and navigate to a directory containing .java files in subdirectories corresponding to the package hierarchy.
All these ways work until I quit Eclipse and come back in.
I have never used these parts of Eclipse; I'm using Maven to manage my dependencies and Maven will automatically attach sources - so take my answer with a grain of salt :-)
I'm not sure why Eclipse doesn't remember those settings. My current feeling is that those settings are temporary.
If you edit the source attachments in the project's properties (look for "Java Build Path"; there is a tab "Libraries"), then the changes should be saved in the file .classpath. Have a look in there.
Lastly, you can try to create a "User Library" (search for this term in the preferences dialog). Here, you can define a bundle of JARs which make up some library. After adding the code JAR, you get options to specify the source JAR.

org.eclipse.swt.*; The import org.eclipse cannot be resolved

I am trying to write a small program that requires the import statement import org.eclipse.swt.*;. (I'm practicing with THIS tutorial).
However, Eclipse won't compile the program and is giving me the error "The import org.eclipse cannot be resolved"
Google hasn't been such a a great friend at finding the answer this time.
This is because you haven't added the SWT library to your buildpath. Follow the steps of the tutorial:
Download SWT library. For 3.1.2 version of eclipse, SWT library is available at
http://archive.eclipse.org/eclipse/downloads/drops/R-3.1.2-200601181600/index.php
Look for the section titled SWT Binary and Source.
From main menu tool bar, select "File" followed by "Import". Doing so will bring up the "Import wizard" dialog.
Now select "Existing Projects into Workspace" and click on "Next" button.
Click on "Select archive file" followed by "Browse" button. Now locate the SWT archive that you downloaded in step 1.
Click the Finish button to finish importing the SWT project into your workspace.
Create new java project from File > New Java Project.
Right-click on the project and select the Properties command to open the Properties dialog.
Select the Java Build Path followed by Projects tab and click the Add button.
Select the org.eclipse.swt project and click OK to finish adding the SWT libraries to your project's classpath
Create a Maven project and add org.eclipse.swt dependency in pom.xml:
<!-- https://mvnrepository.com/artifact/org.eclipse.swt.org.eclipse.swt.win32.win32.x86_64.4.3.swt/org.eclipse.swt.win32.win32.x86_64 -->
<dependency>
<groupId>org.eclipse.swt.org.eclipse.swt.win32.win32.x86_64.4.3.swt</groupId>
<artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>
<version>4.3</version>
</dependency>
You can find the 64bit version of the SWT library by changing the download url to this:
http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.3-201306052000/swt-4.3-win32-win32-x86_64.zip
I had the same issue, was using wrong settings in the target file.
If you are working with a target-definition make sure to use the right platform/architecture settings, see

How to add eclipse-source javadoc to java-build-path in?

I have an Eclipse RCP Project.
I am using Eclipse source classes, for that I am have a target platform with Eclipse's update site.
The plugins are imported from the target site, but without the Javadoc.
Quesion:
What is the location of the Eclipse's Javadoc for Eclipse RCP classes?
Add the Javadoc for a jar
It is also possible to add Javadoc to a library which you use.
Download the Javadoc of the jar and put it somewhere in your filesystem.
Open the Java Build Path page of a project via Right click on a project → Properties → Java Build Path. On the Libraries tab expand the library's node, select the Javadoc location attribute and press the Edit button.
Enter the location to the file which contains the Javadoc.
sourcepath="D:/eclipse3.3.2/plugins/org.eclipse.rcp.source_3.3.3.r33x_r20080129-8y8eE9UEUWI6qujeED0xT7bc/src/org.eclipse.osgi_3.3.2.R33x_v20080105/src.zip"
just try to adapte this to your case.
There is a checkbox to import the sources, inside of teh target platform's update-site dialog.

Hadoop Documentation for Eclipse

I recently installed Hadoop and am able to run simple programs.
However I would like to view documentation for Hadoop classes within Javadoc browser in Eclipse.
Please let me know how to enable that (I am a little novice with Eclipse IDE).
Thanks.
A couple of suggestions:
If you're using maven for your dependency management, you should be able to expand out the list of Maven dependencies in your Eclipse project, right click the hadoop-core-x.x.x.jar and select Maven -> Download Javadocs
Otherwise you'll need to source the Javadocs from the $HADOOP_HOME/docs/api folder and associated with your hadoop-core-x.x.x.jar in Eclipse. In Eclipse, right click your Java project and select Build Path -> Configure Build Path. Now click the Libraries tab and locate the entry for hadoop-core-x.x.x.jar. Expand the entry to show options for Source, Javadoc etc locations and click the Javadoc location entry. Now click the Edit button to the right and enter the location as the path $HADOOP_HOME/docs/api in the Javadoc URL text box (mine is file:/opt/hadoop/hadoop-1.0.2/docs/api/)
Either way now you should be able to hover over Hadoop classes in Eclipse and the Javadoc will popup. You can also show the Javadoc window that will populate for the class you are currently viewing, or just open an internal browser window and point it at the $HADOOP_HOME/docs/api/index.html file
Another easy solution for those who want to stay updated is to edit the Javadocs path like Chris said:
"In Eclipse, right click your Java project and select Build Path -> Configure Build Path. Now click the Libraries tab and locate the entry for hadoop-core-x.x.x.jar. Expand the entry to show options for Source, Javadoc etc locations and click the Javadoc location entry. Now click the Edit button to the right and enter the location as the path"
but instead of linking it directly to the api you have stored on your hard disk, link it to http://hadoop.apache.org/docs/stable/api/