Bug 14421 Old .CLASS Files Are Not Deleted
When creating a project that does NOT use source folders (and does not use a bin directory for .class files) the .java and .class files are stored together in the Java package structure. When converting a project to use source folders (and the required bin directory for .class files), the old .class files stored in the Java package structure are NEVER DELETED by Eclipse. This is a bug for Eclipse 1.0 and 2.0. Since I use WSDD 4.0 (which is built on Eclipse 1.0), I've seen compilation errors due to the fact that the compiler/JDT is using old .class files rather than the new ones in the project's bin directory. I have not managed to reproduce the compile errors in build 20020416. But since the old .class files should have been deleted this is still a bug for the latest build.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewJavaProjectWizardPage.java
import org.eclipse.swt.widgets.Control;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.util.Assert;
import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages;
import org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathsBlock;
/**
 * Standard wizard page for creating new Java projects. This page can be used in 
 * project creation wizards for projects and will configure the project with the 
 * Java nature. This page also allows the user to configure the Java project's 
 * output location for class files generated by the Java builder.
 * <p>
 */
public class NewJavaProjectWizardPage extends NewElementWizardPage {
	
	private static final String PAGE_NAME= "NewJavaProjectWizardPage"; 
	private WizardNewProjectCreationPage fMainPage;
	
	private IPath fOutputLocation;
	private IClasspathEntry[] fClasspathEntries;
	private boolean fAddJRE;
	
	private BuildPathsBlock fBuildPathsBlock;