How do I write a shell script or batch file to run Javadoc?
Typing a javadoc command on the command line is burdensome and error-prone, especially if you use many options. You can move part of the command into files in two different ways: • Use the @file option to place the package or source filenames in a separate file. • On Windows, here is a Windows shell script. Save it to disk (in our example we call it run-javadoc.bat), then run it (run-javadoc.bat). • On Solaris, write a shell script to hold the entire command, save it to a file, make the file executable, then run it. For example, here is a Solaris shell script. Save it to disk (in our example we call it run-javadoc), make it executable (chmod a+x run-javadoc), then run it (run-javadoc). NOTE – On Solaris, it is very important to make sure the backslash continuation character (\) is the last character on any line, not followed by spaces.
Typing a javadoc command on the command line is burdensome and error-prone, especially if you use many options. You can move part of the command into files in two different ways: • Use the @file option to place the package or source filenames in a separate file. • On Windows, here is a Windows shell script. Save it to disk (in our example we call it run-javadoc.bat), then run it (run-javadoc.bat). • On Solaris, write a shell script to hold the entire command, save it to a file, make the file executable, then run it. For example, here is a Solaris shell script. Save it to disk (in our example we call it run-javadoc), make it executable (chmod a+x run-javadoc), then run it (run-javadoc). NOTE – On Solaris, it is very important to make sure the backslash continuation character (\) is the last character on any line, not followed by spaces. If it is followed by a space, javadoc will stop execution and display a misleading error message saying “No package, class, or source file found named .