Name: mc57594 Date: 02/13/97
You can reproduce the problem with the script included below.
It will create a few files and directories and then run javac.
When I do this, I get the following error messages:
./java/lang/reflect/Method.java:3: Class milk.java.lang.reflect.Method already defined in java/lang/reflect/Method.java.
public class Method
^
SillyMethod.java:3: Class java.lang.reflect.Method not found in import.
import java.lang.reflect.Method;
^
2 errors
Here's the script:
#!/bin/csh -f
#
# Bug in javac 1.1b3: The compiler gets confused about file/class
# names that partially mirror the java name hierarchy.
#
# Reported by Dan Bornstein, ###@###.###
#
rm -f SillyMethod.java
cat >SillyMethod.java << EOF
package milk;
import java.lang.reflect.Method;
public class SillyMethod
{
SillyMethod (Method target)
{
}
}
EOF
rm -rf java
mkdir java
mkdir java/lang
mkdir java/lang/reflect
cat >java/lang/reflect/Method.java << EOF
package milk.java.lang.reflect;
public class Method
{
}
EOF
rm -rf out
mkdir out
javac -d out SillyMethod.java java/lang/reflect/Method.java
company - Electric Communities , email - ###@###.###
======================================================================
- duplicates
-
JDK-4306482 # Need improved diagnostics for misplaced source files and ill-formed classpath
-
- Closed
-