Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Since the Java API pages have no search function, at least not one that I see, how do I find out what methods are in which packages?

share|improve this question
2  
Welcome to PSE. Please read the site's FAQ and guidelines to asking questions. You may want to edit your question after you do to meet more of the guidelines. – Walter Jan 17 '11 at 1:01

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer: please explain why you're recommending it as a solution. Answers that don't explain anything will be deleted. See Good Subjective, Bad Subjective for more information.

closed as off topic by gnat, MichaelT, Kilian Foth, GlenH7, Robert Harvey Apr 29 at 23:30

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

7 Answers

Google using the "site:" option

Example to find a "sleep" method: site:http://docs.oracle.com/javase/6/docs/api sleep

share|improve this answer
1  
Not working (anymore?) – grasGendarme Apr 29 at 14:01
2  
That's because they changed the site name. Find the api site, find the root site (similar to what is shown here), and replace for the site: search. For java 6 - site:http://docs.oracle.com/javase/6/docs/api/ MethodOrClassImLookingFor – Drake Clarris Apr 29 at 14:56
1  
Edited. Thanks! (Edits are better than downvotes). – Ryan Hayes Apr 29 at 17:10

You can't really search per method in the Javadoc, as its main entry point is classes. However, if you know the class name, I advise use to use :

share|improve this answer

I do all my language searching at http://www.gotapi.com/html.

It has full typeahead searching.

share|improve this answer
1  
would you mind explaining more on what it does and what it's good for? "Link-only answers" are not quite welcome at Stack Exchange – gnat Apr 29 at 14:03

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer: please explain why you're recommending it as a solution. Answers that don't explain anything will be deleted. See Good Subjective, Bad Subjective for more information.

CTRL+F [object/class], click.

Scroll through, or CTRL+F again for a particular method.

share|improve this answer

I commonly wind up looking at example code, found by searching at a more general level, rather than searching at a low level for functions, and then reading through an example gives the locations of the classes and functions needed to do whatever. Once you have the key classes, you can look at those in the API documentation to see what else they contain that may be useful.

share|improve this answer

Use a browser plugin

Since you use your browser for searching anyway, it makes sense to have a dedicated plugin or search engine configuration dedicated to your need.

Chrome

There's a useful Chrome extension Development and Coding Search. It provides a complete reference documentation search solution for a wide variety of languages.

Firefox

There is a wide variety of Firefox Java API custom search engines available, pick one that suits your need.

share|improve this answer

Google works wonders.

If you know what class you are looking for:

java 6 api String

If you know what method you are looking for:

java 6 api parseInt

If you want to look for a class, you can press Ctrl+f on the version of the API that contains HTML frames. http://download.oracle.com/javase/6/docs/api/

share|improve this answer
+1 This is seriously the answer. – Ross Patterson Apr 29 at 22:00

protected by maple_shaft Apr 29 at 14:47

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.

Not the answer you're looking for? Browse other questions tagged or ask your own question.