I must have done something very stupid which has caused the following situation. Basically after compilation of code which I had compiled successfully lots of times previously, all of the .class files have all of a sudden been put in the package folders, where the .java files are. Some of the .class files have even numbers in the names like.
ClassName.java
ClassName.class
ClassName$1.class
ClassName$2.class
ClassName$3.class
ClassName$4.class
It looks a mess in the Navigator and rebuilding or cleaning the project doesn’t make these files go away.
The last code change I made, which has now been reverted was in the class static field:
static {
if (System.getProperty("os.name").startsWith("Mac OS X")) { CONTROL_PANEL_WIDTH = 225; }
else { CONTROL_PANEL_WIDTH = 180; }
System.out.println(System.getProperty("os.name")); // this is what I added; perhaps it was stupid
}
I must have done something silly. Can you help please?
You might have switched your default output folder of your classes, which can be fixed by right click your project ->
Properties->Java Build Path-> TabSource->Default Output folder(set it to<ProjectName>/bin)You could also check the
.classpathfile in your workspace which have to look like this (the path of the output folder is stored relative):