I'm trying to develop a applet, which implements a full-text-search for the standard Java API-documentation. The reason therefore is to enable blind persons to use the documentation (It is basiclly not useable for blind persons in it's current form). So my plan was to use a doclet (JELDoclet) to generate an XML-file of the documentation and let the applet query the XML-file with XQuery. And that's where the problems araise, if I use the source-files included in the JDK, javadoc throws countless errors, like "....\src\java\lang\Class.java:3095 illegal start of type annotaions = new HashMap<>();".
Is there a way to build an XML-file of the API-documentation with javadoc? Where can i get the source codes to do this. Help!
p.s.: Sorry for the bad english :(
Obviously you must be using it wrongly. I suggest investigating that would be a much better line of enquiry that starting a new doclet from scratch.
Doesn't the Javadoc Doclets page have an XML doclet already? I'd be astonished if not.
There is a doclet for XML output, I'm using it, it's called "JELDoclet". But how should the custom doclet work if the standard build-in doclet doesn't work either.
So to clear things up, I extracted the source codes from the zip-file which is delivered with JDK 7 containing the packages java, javax, com, sunw and org.
Then I started javadoc on console using the following cmd:
"javadoc -d c:\jdtest -sourcepath c:\...\j7_source\src -subpackages java.*" note that the "..." stand for directories, I didn't want to write down.
javadoc starts, says "Loading source files for package ..." till it gets to java.io/java.lang where it starts to show errors like the one i described and then continues with "Loading source files for package xyz" and finally showing the message "100 errors" and after that it stops working. No output is generated. I'm using WinXP, if that's an factor to be considered.
a bit of a Google seems to indicate that there used to be an XML doclet, but apparently it got lost or something.
But that doesn't change the fact that this is basically asking for tech support for this jeldoclet thing which is a third party solution. If you Google around a bit more there are more alternatives that perhaps work better, but they all seem pretty old and might not be compatible with Javadoc of Java 7.
No I'm not asking for support for a third party doclet. The errors displayed are generated through the normal use of javadoc. I was testing with the standard doclet just to find out where the errors are produced. I'm not that stupid to ask for support of a third party product, but this seems to be a problem with javadoc and/or the shipped source codes.
There is a list of Doclets in the Javadoc FAQ with all kinds of Doclets, including the MIF doclet that I even contributed code to, back in the day. See here.
If you're trying to Javadoc the JDK you need to have a really good look at the build tools that come with the source code. It isn't just a matter of compiling or Javadoc-ing everything in sight.