java - Get help/examples/documentation from jdk folder -
i have java practical exam in few days. have write programs on notepad, , execute them through cmd (using jdk). question is, there way can access help/documentation in jdk folder? want syntax , method names, etc.
this because in last exam, lost marks because wrote
public class abc extends applet
instead of
public class abc extends applet
the compilation error wasn't helping. if had access syntax, wouldn't have happened.
check whether jdk contains file src.zip
. since on option can turned off during installation, it’s not possible predict whether there, it’s on default.
if file there, can use generate same documentation find here.
first extract files. in theory, javadoc
read them directly zip file, in practice, doesn’t work.
on windows, use
mkdir classes cd classes path-to-jdk\bin\jar xf path-to-jdk\src.zip cd ..
second, generate documentation
mkdir doc path-to-jdk\bin\javadoc -d doc -sourcepath classes -classpath path-to-jdk\jre\lib\rt.jar -subpackages java:javax
afterwards, file doc\index.html
contains starting point of api documentation, equivalent 1 linked above.
it’s challenge read them if don’t have browser, actually, it’s present, i.e. if click on “show help” menu item in notepad, it’ll open browser. if that’s obvious rule bending, can use “open file” dialog instead. enable “all files” , preview window, , show contents of html files if select them, while technically being still in file dialog of notepad rather browser…
Comments
Post a Comment