One question: why OJ_Unknown for non-public classes?
I've been trying to compile code with a large number of package-access
classes, and each one generates an OJ_UnknownX.java and OJ_UnknownXOJMI.java.
Each one of these internally declares a class of the original name. The OJMI
files won't compile at all since they declare a public class with a name that
does not match the file name.
This seems to be generated by openjava.ojc.Compiler in getMainClassName. This
actually causes a variety of bugs, since "nonpubclassid" does not get reset
when generating Java files in "outputToFile" causing the OJMI file and the
Java source to have different IDs, and not reset again in the "javac" phase,
meaning the compiler can't find any of these OJ_Unknown files anyways.
The above error can be fixed by placing the line "nonpubclassid=0;" at the
beginning of outputToFile() and javac(), but it still doesn't fix the fact
that the OJMI classes won't be compiled by Java due to the classname-filename
conflict. I can't really offer a fix to this since I don't really understand
why you use OJ_Unknown in the first place.
Any help appreciated.
I am now using OpenJava_1.1 branch from CVS from Sourceforge.
Michael Jarrett
University of Waterloo
|