Did you perhaps transfer that .class file from another computer using FTP in ASCII mode?
Otherwise maybe you have a non-standard and buggy
java compiler?
Or maybe you compiled with a newer version but are trying to run in an older JVM? (I would expect an error explicitly telling you that if this were the case, but maybe if you explicitly load the class yourself, that may not happen?)
Maybe you have some class named
String that you wrote yourself that is getting confused with java.lang.String?
All we can tell here is that the ClassLoader considers the class to be corrupt. Without any information about how you compiled the class or what its superclass looks like or how it got to be available to your classloader or how you're loading it, it's hard to say anything definite.