JDK-4370719 : Better diagnosis of bad class file name/package name.
  • Type: Bug
  • Status: Closed
  • Resolution: Fixed
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Priority: P5
  • Affected Version: 1.2.0,1.4.0
  • OS: generic,solaris_2.6
  • CPU: generic,sparc
  • Submit Date: 2000-09-13
  • Updated Date: 2002-06-27
  • Resolved Date: 2002-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
1.4.1 hopperFixed
Related Reports
Duplicate :  
When you write a shell script in Solaris to run javadoc 
(let's name it "run-javadoc"), such as the following:

/usr/local/java/jdk1.3/solaris/bin/javadoc -d docs \ 

and if you mistakenly put a space after a continuation character (\),
such as at the end of the second line, you get this misleading
error message:

% run-javadoc
javadoc: No package, class, or source file found named  .
1 error
run-minimal: java.applet: not found

The error message always says that the statement following the extra space
is not found.  It took me about 20 minutes to figure out the extra space 
was causing this problem.  What we need is a message that is not misleading,
and can better pinpoint the problem.

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: hopper FIXED IN: hopper INTEGRATED IN: hopper VERIFIED IN: hopper-beta


SUGGESTED FIX Reject any file name that is not (1) a valid Java source file name, or (2) a valid Java package name. At the very least, quote the file name when reporting being unable to open it. neal.gafter@Eng 2000-12-20

EVALUATION I'm not sure this is even possible, but if so, it would be quite helpful. (Submitted by me) doug.kramer@Eng 2000-12-08 Well, we could certainly put quotes areound the file name in the error message. Cheap and easy. neal.gafter@Eng 2000-12-13 Doug Kramer wrote: > I'm not clear on your proposal to put quotes around the file name. > How would that help? > The problem is that the error message does not mention that > there is an extra space following the continuation character. > (I'm not sure if javadoc can be aware of this extra space.) javadoc doesn't know there was a continuation character. That's a function of your shell. That is a perfectly valid syntax for specifying a file whose name is a space. If our error message produced quotes around the filename, you would see that we're trying to process a file named " ". Changed the synopsis from javadoc: Better error msg when space follows continuation char in shell script to javadoc: Error message when failing to open file should quote filename neal.gafter@Eng 2000-12-14