5

I have a set of over 500 jar files for a whole range of plugins that we have from a third party, and for each of these jar files there is a source jar file as well. But they have not provided the javadoc.

I want to be able to build the javadocs from the provided source jar files, but can't tell if javadoc.exe will do this for me. I haven't used it manually for years, so not familiar with the command line options.

One of the guys here showed me how to import the source file into Eclipse so I could browse the Source. but doing that over 500 times is a very time consuming exercise.

Cheers

3
  • If you are targeting Eclipse and your file names are consistent: you could edit the .classpath file with something like sed to add the sourcepath attributes. Jul 1, 2014 at 0:31
  • The javadoc tool can't do mass javadoc operations like this easily. Sorry.
    – tbodt
    Jul 1, 2014 at 0:41
  • The problem is with linking in eclipse, is that I have many plugins I am developing against the framework, so have to modify .classpath for each. If I then generate javadocs and include external plugins, it only includes the ones that are used, not the whole lot in one go.
    – simo.3792
    Jul 1, 2014 at 1:12

1 Answer 1

3

Because all the source file and plugins jars are together in the same directory I have found a relatively simple solution, using eclipse.

  1. In Eclipse -> Open a new workspace (so as not to flood your working area)
  2. Under Preferences, select Plug-in Development/Target Platform. Create new Target Platform with all of the plugins included and set as current.
  3. In the Plug-in browser view, select all plugins, right click, select Import As -> Source Project. At this point all the source files are loaded into the workspace.
  4. In the package explorer. Select Project -> Generate javadocs. Unfortunately in this dialog, there is no select all option - so if you have 500 plugins, then you have to select them one-by-one.

And if that finishes without crashing, then all is winner.

NOTE: My first attempt using 32-bit eclipse and javadoc failed, I think due to the number of plugins/files, but I then used a 64-bit Eclipse and Javadoc, which took about an hour, but did work.

1
  • In which Preferences? I don't see Plug-in Development/Target Platform under Window/Preferences.
    – Line
    May 17, 2017 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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