Invalid character in input error while executing javadoc command

I am trying to execute javadoc command to get the 3-frame API for the following the packages xxx and xxx.yyy

The directory structure is

api

src

-overview.html

- xxx

-package.html

-XXXClass1.java

-yyy

package.html

YYYClass1.java

classes

--xxx

-XXXClass1.class

-yyy

YYYClass1.class

The src files have just the package and class declarations

package xxx;

import yyy.*;

public class XXXClass1 {

}

package xxx.yyy;

public class YYYClass1 {

}

The javadoc command is executed from the src directory.

javadoc -d ../api -overview overview.html -classpath ../classes -sourcepath . xxx xxx.yyy

But I am getting the following error

Loading source file xxx...

Loading source files for package xxx.yyy...

xxx: Invalid character in input.

xxx: Class or interface declaration expected.

xxx: Invalid character in input.

xxx: Invalid character in input.

xxx: Invalid character in input.

.

.

.

Can anybody help me in fixing this?

Thanks,

chitra

[1222 byte] By [csoundap] at [2007-9-26 19:42:25]
# 1

It appears javadoc is looking in -classpath for doc comments.

Try removing the -classpath option completely. There is no

reason to point to the .class files when running javadoc.

It gets everything it needs from the source files by "compiling"

them and throwing away the implementation, keeping only

the declarations and doc comments.

It's unclear if you are using 1.3.x or 1.4.x. The latter version

has a bug where it will look for the .class files for xxx and xxx.yyy

on -classpath and try to document the declarations it finds

there.

-Doug Kramer

Javadoc team

dkramer at 2007-7-3 12:40:09 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
I removed the -classpath option and it worked fine!Thanks a lot.
csoundap at 2007-7-3 12:40:09 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3

1. When I tried to execute the javadoc command on the command line from within the package directory, it gave the "invalid character in input error". But when I executed it outside the package, it worked fine.

Is there any reason behind this?

2.Same thing happens when I try to run the javadoc command at run time as an OS command.

I have 2 packages called "package1" and "package2".

I have a java class called "class2" under package2 from where I am trying to execute a javadoc command(to construct 3-frames API for package1 and package2) using Runtime.exec()

But it always gives the process exitvalue not equal to 0.

When I create a class outside of all these packages and run the same command, it works fine.

Can you please explain these behaviours? How can I run a javadoc command at run time?

Thanks,

chitra

csoundap at 2007-7-3 12:40:09 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 4

1) It depends on whether -sourcepath is relative or absolute.

If absolute, then you can run it anywhere. If relative, then

you must change it to be relative to the current directory

(then you could run it from inside the package).

2) I'm not sure why this would happen. Perhaps this

is related to #1 above.

-Doug Kramer

Javadoc team

dkramer at 2007-7-3 12:40:09 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...