Take the 2-minute tour ×

guys, I used a decompiler jd-gui today and found something quite weird to me.

Let's say I have a jar file, lib.jar, I decompiled it. It came out that there were some class files named like A.class, B.class, a.class, etc, under same package. When I tried to paste the decompiled source files into eclipse project, but IDE said it would not accept A.class and a.class under the same folder. How could it be? I guess no one named his/her class files from a to z. But the decompiler told me so.

Also I tried to import lib.jar in my project, found that I cannot touch any public class or interface under that package where a.class and A.class resides in. No tips came out when I typed into that package, e.g., "import firm.tools."

Could anyone tell me the reason? Thanks in advance, and happy new year!

share|improve this question
The JVM allows all sorts of identifiers and code constructs that Java does not. Obfuscators use this to make code which is not easily decompiled. e.g. you can have spaces in field names. :) –  Peter Lawrey Dec 31 '10 at 9:40

2 Answers 2

up vote 2 down vote accepted


This part is likely due to the fact that you're using a case-insensitive filesystem (e.g. NTFS on Windows). Thus it isn't possible for the IDE to create distinct files for A.class and a.class since the OS views them as equivalent filenames. This is not true for all systems, nor for the Java specification - hence it is possible to define Java classes that differ only in case (though this is not recommended due to the problem you've just illustrated).

(As for the names themselves, I agree with Chris that this is likely the result of obfuscation.)

share|improve this answer
ah, thank you, AD. –  user462872 Dec 31 '10 at 10:21

The jar file you have probably contains obfuscated class files. Obfuscated files have identifiers renamed to make them harder to understand by human readers. (Obfuscation does much more than just rename identifiers, but that's one of the things obfuscation usually does.)

share|improve this answer
I see. It seems too tough to read the decompiled code.Thanks, :) –  user462872 Dec 31 '10 at 10:27

Your Answer


