Java%20Beans%20Interview%20Questions%20and%20Answers
Question: Why do I get a duplicate name error when loading a JAR file?Answer: The most common reason for a "java.lang.ClassFormatError: Duplicate name" error is that a .class file in the JAR contains a class whose class name is different from the expected name. So for example if you have a file called "a/B.class" and it contains a class called "B" or "a.X" instead of the class "a.B" then you will get this error.Themost common causes for this problem are either forgetting to include a "package a;" statement or having a "package" statement with the wrong name. |
Is it helpful?
Yes
No
Most helpful rated by users:
- What are Java Beans?
- Why do I get a NullPointerException when loading a JAR file into the BeanBox?
- What is bean persistance property?
- What are externizable interface?
- What are the purpose of introspection?