Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

The declared package does not match the expected package

843789Mar 29 2009 — edited Aug 13 2010
I was given some Java code that I need to get working and then make some improvements on, but I'm still in the process of learning Java and the IDE Eclipse as well. There is a package called MyGUI and most of the files in that package had the error "The declared package MyGui does not match the expected package MyGUI" as a result of the inconsistent case, so I changed all of the first lines "package MyGui" to "package MyGUI" and this fixed all of those problems except for one.

There is still one file where it gives this error message even though I changed the code the same way I did for the other files. I can't figure why this file is different. I saved it and I also refreshed everything, but it still gives me the error message "The declared package MyGui does not match the expected package MyGUI" although the package is clearly declared as "MyGUI".

Does anyone have an idea of why this would be? I am very new to Eclipse and Java, so I don't really know how to go about solving errors yet.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 10 2010
Added on Mar 29 2009
6 comments
4,102 views