Class already defined -- same file, same line

Starling thesynxj8jw@pacbell.net
Mon Aug 30 07:48:00 GMT 2004


I was attempting to use gcj on a project the Sun java implementation
on Linux does particularly abysmally about, and received the following
error:
---
./project/OpenConnectionManager.java:46: error: Class `project.OpenConnectionMan
ager' already defined in project/OpenConnectionManager.java:46.
 public final class OpenConnectionManager implements Checkpointed {
 ^
./project/OpenConnectionManager.java:98: confused by earlier errors, bailing out
make: *** [project/OpenConnectionManager.o] Error 1
---
The command used to provide the above error was here:
---
gcj -g --encoding=UTF-8 -Wno-deprecated -O -fclasspath=.:servlet.jar -MD -MT fr
eenet/OpenConnectionManager.o -MF project/OpenConnectionManager.d -c -o project/
OpenConnectionManager.o project/OpenConnectionManager.java
---
Normally these errors indicate that a class has been defined in two
places, or that a file exists redundantly. But in this case gcj is
spewing a conflict between the definition of a class in one file, and
the definition of the same class in the same file, on the same line.
There are no other files in sight defining this class.
How do I convince the compiler a class is not conflicting with
itself?
servlet.jar, or any other jar files also don't have any definitions
of the above class.
Starling


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /