FIX: Recursive Import Statement Causes J0161 and J0049 Errors (156920)
The information in this article applies to:
This article was previously published under Q156920 SYMPTOMS
Writing a Java program that recursively imports itself results in the
following error message:
J0161: Cannot open source file: '.\filename'" and "J0049: Undefined name
'filename'
CAUSE
This error message occurs when the Java compiler recursively opens the Java
file until there are too many files open.
WORKAROUND
You should not write programs that recursively import themselves. There is
no conditional compilation in Java, and therefore no reason to write a Java
file that recursively imports itself.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. This problem has been fixed in
Visual J++ 1.1.
REFERENCES
For the latest Knowledge Base articles and other support information on
Visual J++ and the SDK for Java, see the following pages on the
Microsoft Technical Support site:
Modification Type: | Minor | Last Reviewed: | 8/25/2005 |
---|
Keywords: | kbBug kbCommandLine kbfix kbVJ110fix KB156920 |
---|
|