Community
Participate
Working Groups
If one extends a generic class with type information already parameterized, the resulting class file is rejected by javac for an "undeclared type variable". Sample: public class ErrorList extends AbstractList<String> { public String get(int index) { return "Some string"; } public int size() { return 5; // irrelevant } } public class ListTest { public static void main(String ... args) { System.out.println(ErrorList.class.getName()); } } When compiling both classes with javac and Eclipse, respectively, ListTest prints "ErrorList", as expected. When compiling ErrorList with Eclipse and ListTest with javac, javac gives the following error message: ListTest.java:26: cannot access ErrorList bad class file: ..\bin\ErrorList.class undeclared type variable: E Please remove or make sure it appears in the correct subdirectory of the classpath. System.out.println(ErrorList.class.getName()); ^ 1 error
Could not reproduce with I20050627-1435. Looks like a dup of bug 101794. Could you please try to reproduce it with I20050627-1435?
This indeed is a dup. Glad we resolved it for 3.1 in the end. *** This bug has been marked as a duplicate of 101794 ***