Javadoc not Found [duplicate] - java

Right now when I use a built in method, it shows me the returns types and nothing else that's useful.
Is there something I can download to make the info from the intellisense more robust?
Javadoc not found. Either Javadoc
documentation for this item does not
exist or you have not added specified
Javadoc in the Java Platform Manager
or the Library Manager.

You need to download the JDK API docs, which you can get from this page.
Then in NetBeans, go to Tools -> Java Platforms -> Javadoc to specify the directory where you downloaded them.

The javadocs come in the jdk package or at least in JDK 1.8. You can add the zip files named src.zip and javafx-src.zip to the tools>java platform>Javadoc.

Related

Netbeans v11.2 and Oracle JDK13 javadocs issues

I'm running NB 11.2 with Oracle JDK 13.0.1+9
NB's Java Platform ->> Javadocs (tab) is empty (no entries).
When I type (NB editor) java.math. -or- java.nio. (examples), pop-open menus shows methods AND the full javadoc info for each method as expected.
But when I type java.sql. -or- java.rmi. (examples), I get the methods listed, BUT Javadoc shows just the package and class definition and a message ((THE MESSAGE)) that reads:
Javadoc not found. Either Javadoc documentation for this item does not exist or you have not added specified Javadoc in the Java Platform Manager or the Library Manager.
Here's a screenshot:
So I added this URL to the Java Platforms ->> Javadocs tab:
https://docs.oracle.com/en/java/javase/13/docs/api/
No help...same problem.
So I added this URL Java Platforms ->> Javadocs tab:
https://docs.oracle.com/en/java/javase/13/docs/api/java.sql/
Now, the results changed, but still wrong. I've lost THE MESSAGE, but the package and class def shows with all blank text afterwards.
If this isn't a bug in NB/Oracle URL, then it seems very poorly documented which is evidenced by the sheer number of questions asked on SO.
Also, I'd like to download the whole javadoc .zip file and use a file ref instead of a URL. Is this still possible?
I'm running NB 11.1 with Oracle JDK 13.0.1+9...
That's a problem in itself. While it may appear to work, NetBeans 11.1 does not support the use of JDK 13. From the Product Manager for NetBeans: "Apache NetBeans 11.1 supports JDK 8 to JDK 12". Unfortunately I can't see this being explicitly stated anywhere on the Apache NetBeans web site.
So to successfully access Javadocs for JDK 13 in your applications:
Download and install Apache NetBeans 11.2.
In NetBeans 11.2, use Tools > Java Platforms to add JDK 13.
Follow the instructions below to install a local copy of the Javadoc for JDK 13.
Also, I'd like to download the whole javadoc .zip file and use a file
ref instead of a URL. Is this still possible?
Yes:
You can download the JDK 13 API Javadoc file jdk-13.0.1_doc-all.zip from here.
There no need to unzip the downloaded file.
In NetBeans 11.2 open Tools > Java Platforms > select your JDK 13 platform entry.
Click the Javadoc tab then click Add Zip/Folder...
Navigate to the downloaded file jdk-13.0.1_doc-all.zip, select it, then click Add Zip/Folder...
An entry for it will be added in the Platfrom Javadoc list. Remove any https URLs you had added previously, so that it is the only Javadoc entry for JDK 13:
Once you have done all that, Javadoc should work fine for your JDK 13 applications. Here's an example using java.rmi package which was not working for you:

How to extend java documentation in Netbeans

I am using Netbeans 8.0.2 for java, while the auto-complete option is on and running it looks like not enough documentions is available or JavaDoc is missing, the message from Netbeans auto-complete says:
Javadoc not found. Either Javadoc documentation for this item does not exist or you have not added specified Javadoc in the Java Platform Manager or the Library Manager.
When referring to Netbeans help on this everything seems in order.
So what is missing in Netbeans java documentation, or can it be extended?

Where can I find the package javax.media.opengl?

I need to import the javax.media.opengl.* package. From Java OpenGL Wiki to http://jogamp.org/, I am sort of confused which download I need. There is a long list of build downloads here, but they are all .7z files and I am looking for a download usable for a Windows XP 32-bit machine.
This answer is outdated. JOGL has changed the package name.
javax.media.opengl is now com.jogamp.opengl
be aware if you have an old project and you try to get the latest library version.
You only need two packages for java OpenGL:
jogl.all.jar -> this contains javax.media.opengl.
gluegen-rt.jar -> this contains com.jogamp.opengl.
Both of which are in here: jogamp-all-platforms.7z
http://jogamp.org/deployment/jogamp-current/archive/
Edit
They seem to have reorganized their site. I updated the link.
The 7z archive format can be extracted with 7-zip, which is available on Windows.

Where can I find the JDK documentation, and how can I read it offline? [duplicate]

When writing Java code, I refer extensively to the Javadoc—that is, the Java® Platform, Standard Edition & Java Development Kit Version x API Specification. I know how to read it online from the website, but I would like to download a copy to my computer so that I can read it offline when no Internet connection is available.
How can I download the documentation? Is there a way to "download" the Javadoc (JDK documentation) from an online site to a local file?
The online docs I am using tend to reject clients such as Eclipse, making work difficult, so I need to pull them onto my machine and attach them to my library JAR.
Links to JDK documentation
Java SE
Download
Web
Other
21 (Early-Access)
Not yet available
Javadoc
Project page
20 (Early-Access)
Not yet available
Javadoc
Project page
19 (current) 🟢
Downloads page
Javadoc
Doc home
18
Downloads page
Javadoc
Doc home
17 (LTS)
Downloads page
Javadoc
Doc home
16
no longer available
Javadoc
Doc home
15
no longer available
Javadoc
Doc home
14
no longer available
Javadoc
Doc home
13
no longer available
Javadoc
Doc home
12
no longer available
Javadoc
Doc home
11 (LTS)
Downloads page
Javadoc
Doc home
10
no longer available
Javadoc
Doc home
9
no longer available
Javadoc
Doc home
8 (LTS)
Downloads page
Javadoc
Platform homeDoc home
7
no longer available
Javadoc
Doc home
6
no longer available
Javadoc
Doc home
Also of interest:
Release Notes
History of Java SE versions
First, make sure they don't already offer an download in zip form or similar.
Then, make sure you are actually allowed to do this (this may depend on where you live, and on any conditions mentioned on the web site from where you want to pull this).
Then, have a look at the Wget tool. It is part of the GNU system, thus included in many Linux distributions, but also available for Windows and Mac, I suppose.
Something like this works for me:
wget --no-parent --recursive --level inf --page-requisites --wait=1 \
https://epaul.github.io/jsch-documentation/simple.javadoc/
(without the line break; it should be escaped by the \ backslash here).
Look up what each option does in the manual before trying this.
If you want to do this repeatedly, look into the --mirror option.
For downloading other websites, --convert-links might also be useful, but I found that is not needed for Javadocs, which usually have the correct absolute and relative links.
This downloads lots of the same copy of the index.html file with appended ?... names (for the FRAMES links on each page). You can remove these files after downloading by adding the --reject 'index.html\?*' option, but they still will be downloaded first (and checked for recursive links). I did not yet find out how to avoid downloading them at all. (See this related question on Server Fault.)
Maybe adding the right recursion level would help here (I didn't try).
After downloading, you might want to zip the resulting directory to take less disk space. Use the zip tool of your choice for this.
For any Javadoc (not just the ones available for download) you can use the DownThemAll addon for Firefox with a suitable renaming mask, for example:
*subdirs*/*name*.*ext*
https://www.downthemall.org/main/install-it/downthemall-3-0-7/
It's possible to use some older versions of the DownThemAll add-on with Pale Moon browser.
You can use something called Dash: Offline API Documentation for Mac. For Windows and Linux you have an alternative called Zeal.
Both of them are very similar. And you can get offline documentation for most of the APIs out there like Java, Android, Angular, HTML5, etc. ... almost everything.
I have also written a post on How to install Zeal on Ubuntu 14.04
update 2019-09-29: Java version 11
The technique below does not now work with Java 11, and probably higher versions: there is no way of ignoring multiple "broken links" (i.e. to other classes, other APIs). Solution: keep your javadoc executable file (or javadoc.exe) from Java version 8
There are good reasons for making your own local javadocs, and it's not particularly difficult!
First you need the source. At the time of writing the Java 8 JDK comes with a zip file called src.zip. Sometimes, for unexplained reasons, Oracle don't always include the source. So for some older versions (and who knows about the future) you have to get hold of the Java source in another way. It's worth also being aware that, in the past, Oracle have sometimes included the source with the Linux version of the JDK, but not with the Windows one.
I just unzipped this file... the top directories are "com", "java", "javax", "launcher" and "org". Directory launcher contains no files to document.
You can generate the javadocs very very simply from any or all of these by CD'ing at the command prompt/terminal to the directory ...\src. Then go
javadoc -d docs -Xmaxwarns 10 -Xmaxerrs 10 -Xdoclint:none -sourcepath . -subpackages java:javax:org:com
NB note that there is a "." after -sourcepath
Simple as that. Generating your own javadocs also has 2 huge advantages
you know they are precisely the right javadocs for the JDK (or any exernal jar file) you are using on your system
once you get into the habit, reconstituting
your Javadocs is not a tiresome challenge (i.e. where to go looking for them). For example I just unzipped a couple of source jars whose packages are closely coupled, so their sources were in effect "merged" & then made a single Javadoc from them...
NB Swing is semi-officially DEAD. We should all be switching to JavaFX, which is helpfully bundled with Java 8 JDK, but in its own source file, javafx-src.zip.
Unzipped, this reveals 3 "root" packages: com, javafx and netscape (wha'?). These should be manually moved over the to appropriate places under the unzipped src directory (including the JavaFX com.sun packages under the Java com.sun strcture). Compiling all these Javadoc files took my machine a non-negligible time. I'd expect to see all the JavaFX source classes in with all the other source classes some time soon.
BTW, the same thinking applies to documenting any and all Java jars (with source) which you use. However, all versions of most jars will be found with their documentation available for download at Maven Central http://search.maven.org...
PS afterthought: using Eclipse and the "Gradle STS" plugin: the "New Gradle STS Project" wizard will create a gradle.build file containing the line
include plugin: 'eclipse'
This magically downloads the source jar with the executable jar (under GRADLE_HOME) when you go
./gradlew build
[addendum 2020-01-13: if you have chosen not to include the Eclipse plugin in your build.gradle, it would appear that you can go (with the selection on your project in the Project Explorer) Right-click Gradle --> Refresh Gradle Project to get Eclipse to download the source files.]
... giving you an extra degree of certainty that you have got the right src and therefore the right javadoc for the dependency in question.
I have used Javadoc packaged by Allimant since I was in college.
The Javadoc is in the CHM format (standard Windows help format), so it's the best viewed when you're using Windows.
For the download of latest Java documentation (JDK 8u77) API
Navigate to http://www.oracle.com/technetwork/java/javase/downloads/index.html
Under Addition Resources and Under Java SE 8 Documentation,
click the Download button.
Under Java SE Development Kit 8 Documentation → Java SE Development Kit 8u77 Documentation.
Accept the License Agreement and click on the download ZIP file.
Unzip the downloaded file
Start the API documentation from jdk-8u77-docs-all\docs\api\index.html
For the other Java versions API download, follow the following steps.
Navigate to http://docs.oracle.com/javase/
From Release dropdown, select either of Java SE 7/6/5.
In corresponding Java SE page and under Downloads left side menu,
click JDK 7/6/5 Documentation or Java SE Documentation.
Now on the next page, select the appropriate Java SE Development Kit 7uXX Documentation.
Accept License Agreement and click on Download ZIP file.
Unzip the file and start the API documentation from
jdk-7uXX-docs-all\docs\api\index.html.
In this case ... make your own javadocs!
First you need the source. At the time of writing the Java 8 JDK comes with a zip file called src.zip. Sometimes, for unexplained reasons, Oracle don't always include the source. So for some older versions (and who knows about the future) you have to get hold of the Java source in another way. It's worth also being aware that, in the past, Oracle have sometimes included the source with the Linux version of the JDK, but not with the Windows one.
I just unzipped this file... the top directories are "com", "java", "javax", "launcher" and "org". Directory launcher contains no files to document.
You can generate the javadocs very very simply from any or all of these by CD'ing at the command prompt/terminal to the directory ...\src. Then go
javadoc -d docs -Xmaxwarns 10 -Xmaxerrs 10 -Xdoclint:none -sourcepath
. -subpackages java:javax:org:com
NB note that there is a "." after -sourcepath
Simple as that. Generating your own javadocs also has the huge advantage that you know they are precisely the right javadocs for the JDK you are using on your system.
The same applies to documenting any and all Java .jars (with source) which you use. However, all versions of most jars will be found with their documentation available for download at Maven Central http://search.maven.org...
JavaFX API documentation
You could download the Mac 2.2 preview release from here and unzip it.
http://www.oracle.com/technetwork/java/javafx/downloads/devpreview-1429449.html
The Javadoc won't quite match 2.1, but it will be close and if you use the preview instead, it will match exactly.
For the download of latest java documentation(jdk-8u77) API
Navigate to http://www.oracle.com/technetwork/java/javase/downloads/index.html
Under Addition Resources and Under Java SE 8 Documentation
Click Download button
Under Java SE Development Kit 8 Documentation > Java SE Development Kit 8u77 Documentation
Accept the License Agreement and click on the download zip file
Unzip the downloaded file
Start the API docs from
jdk-8u77-docs-all\docs\api\index.html
For the other java versions api download, follow the following steps.
Navigate to http://docs.oracle.com/javase/
From Release dropdown select either of Java SE 7/6/5
In corresponding JAVA SE page and under Downloads left side menu
Click JDK 7/6/5 Documentation or Java SE Documentation
Now in next page select the appropriate Java SE Development Kit 7uXX Documentation.
Accept License Agreement and click on Download zip file
Unzip the file and Start the API docs from
jdk-7uXX-docs-all\docs\api\index.html
The updated latest version of "The Java language Specification" can be found via the following links.
Java 7
Java 8
For example, Java Platform Standard Edition 7 Documentation has a link to download "JDK 7 Documentation" in the sidebar under "Downloads". I'd expect the same for other versions.

Eclipse Generate Javadoc Wizard: what is "Javadoc Command"?

I want to generate the javadocs for an open-source code-base I'm using. But I'm being asked for a "Javadoc Command" by the Eclipse Generate JavaDoc wizard and the help doesn't explain what this means. Is it wanting the path to the javadoc binary/jar or something else?
Yes, presumably it wants the path to the javadoc command line tool that comes with the JDK (in the bin directory, same as java and javac).
Eclipse should be able to find it automatically; are you perhaps running it on a JRE? That would explain the request.
Yes, it is asking for the application/executable that is capable of creating Javadoc. There is a javadoc executable inside the jdk's bin folder.
You may need to add a JDK (Java Development Kit) to the installed JRE's within Eclipse
Go to Window->Preferences->Java->Installed JRE's
In the Name column if you do not have a JDK as your default, then you will need to add it.
Click the "Add" Button and locate the JDK on your machine.
You may find it in this location: C:\Program Files\Java\jdk1.x.y
Where x and y are numbers.
If there are no JDK's installed on your machine then download and install the Java SE (Standard Edition) from the Oracle website.
Then do the steps above again. Be sure that it is set as the default JRE to use.
Then go back to the Projects->Generate Javadoc... dialog
Now it should work.
Good Luck.
Had this problem and solved typing this : C:\Program Files (x86)\Java\jdk1.7.0_51\bin\javadoc.exe
There are already useful answers to this question above, however there is one more possibility which I don't see being addressed here.
We should consider that the java is installed correctly (that's why eclipse could have been launched in the first place), and the JDK is also added correctly to the eclipse. So the issue might be for some reason (e.g. migration of eclipse to another OS) the path for javadoc is not right which you can easily check and modify in the javadoc wizard page. Here is detailed instructions:
Open the javadoc wizard by Project->Generate Javadoc...
In the javadoc wizard window make sure the javadoc command path is correct as illustrated in below screenshot:

Categories

Resources