The following snippet runs on Sun VM but fails when using Gun classpath (using JamVM):
public class T { static enum E { A, B, C } public static void main(String[] args) { E e= E.valueOf("A"); System.out.println(e); } } Reason: the implementation of Enum.valueOf uses reflection to access the value of field E.A, but class Enum is not in the same package as E and thus has no access to this field. => Field.get(..) throws IllegalAccessException. Chaning E to public avoids the problem. -- Summary: Enum.valueOf throws java.lang.Error: Unable to access Enum class Product: classpath Version: 0.92 Status: UNCONFIRMED Severity: normal Priority: P3 Component: classpath AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: stephan at cs dot tu-berlin dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33813 _______________________________________________ Bug-classpath mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-classpath