Reputation: 3
I am trying to open javadoc from cmd
javadoc * .java
string.java
index.html
but it is not working. I want offline access to javadoc.Please help
Upvotes: 0
Views: 336
Reputation: 704
You can use jshell
to start a REPL. To see the documentation of a class/method, import it, type its name and press tab twice:
jshell> import javax.swing.*
jshell> JComponent
Signatures:
javax.swing.JComponent
<press tab again to see documentation>
jshell> JComponent
javax.swing.JComponent
The base class for all Swing components except top-level containers.To use a component that
inherits from JComponent , you must place the component in a containment hierarchy whose root
is a top-level Swing container. Top-level Swing containers -- such as JFrame , JDialog , and
JApplet -- are specialized components that provide a place for other Swing components to paint
themselves. For an explanation of containment hierarchies, see Swing Components and the
Containment Hierarchy , a section in The Java Tutorial .
...
Upvotes: 1
Reputation: 11440
Just download it from Java SE Development Kit 8 Documentation. Take the jdk-8u51-docs-all.zip. For use with a browser just unzip it and open the docs/api/index.html for an IDE like Eclipse there is always an option to set the path to the offline javadoc and it can read it directly from zip. For an IDE is also recommend to download the source files for an better offline usage.
The javadoc command is for generating javadoc from classes but not for viewing.
Upvotes: 1