This is probably because of the type-insensitivity of the Windows file system. This would get messed up in Java too. The compiled .class files for the upper- and lower-case versions are indistinguishable and cannot both exist in the filesystem at the same time.
The object rational
generates both a rational$.class
and a rational.class
.
The class Rational
generates a Rational.class
. This appears to be being overwritten by rational.class
. When the JVM tries to read Rational.class
it finds rational.class
, sees that the content is wrong, and complains bitterly about having been led astray.