updated to provide project as resource if no main type
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaMigrationDelegate.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaMigrationDelegate.java
index 29939bb..8e33cb0 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaMigrationDelegate.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaMigrationDelegate.java
@@ -95,9 +95,9 @@
 		IResource resource = null;
 		String pname = candidate.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, EMPTY_STRING);
 		if(!EMPTY_STRING.equals(pname)) {
+			IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(pname);
 			String tname = candidate.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, EMPTY_STRING);
 			if(!EMPTY_STRING.equals(tname)) {
-				IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(pname);
 				if(project != null && project.exists() && project.isOpen()) {
 					IJavaProject jproject = JavaCore.create(project);
 					if(jproject != null && jproject.exists()) {
@@ -112,6 +112,9 @@
 					}
 				}
 			}
+			else {
+				return project;
+			}
 		}
 		return resource;
 	}