[272013] JEM JemProjectUtilities#getClasspathAsURLArray(IJavaProject) fails to handle class folders
diff --git a/features/org.eclipse.jem.feature.patch/buildnotes_org.eclipse.jem.feature.patch.html b/features/org.eclipse.jem.feature.patch/buildnotes_org.eclipse.jem.feature.patch.html
index 76d5f03..5909897 100644
--- a/features/org.eclipse.jem.feature.patch/buildnotes_org.eclipse.jem.feature.patch.html
+++ b/features/org.eclipse.jem.feature.patch/buildnotes_org.eclipse.jem.feature.patch.html
@@ -17,5 +17,6 @@
 <p>Bug <a href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=247701'>247701</a>. JavaFieldJDOMAdapter causing StringIndexOutOfBoundsException</p>
 <p>Bug <a href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=247895'>247895</a>. EJBValidator fails silently</p>
 <p>Bug <a href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=249019'>249019</a>. Japanese chars in source code changed to illegible unicode</p>
+<p>Bug <a href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=272013'>272013</a>. JEM JemProjectUtilities#getClasspathAsURLArray(IJavaProject) fails to handle class folders</p>
 <p>Bug <a href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=290131'>290131</a>. Exceptions from JEM in adopter product</p>
 </body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.jem.feature.patch/feature.properties b/features/org.eclipse.jem.feature.patch/feature.properties
index 5c56dc9..cbd1678 100644
--- a/features/org.eclipse.jem.feature.patch/feature.properties
+++ b/features/org.eclipse.jem.feature.patch/feature.properties
@@ -30,6 +30,7 @@
 Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=247701 JavaFieldJDOMAdapter causing StringIndexOutOfBoundsException\n\
 Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=247895 EJBValidator fails silently\n\
 Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=249019 Japanese chars in source code changed to illegible unicode\n\
+Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=272013 JEM JemProjectUtilities#getClasspathAsURLArray(IJavaProject) fails to handle class folders\n\
 Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=290131 Exceptions from JEM in adopter product\n\
 \n\
 copyright=\
diff --git a/plugins/org.eclipse.jem.workbench/workbench/org/eclipse/jem/workbench/utility/JemProjectUtilities.java b/plugins/org.eclipse.jem.workbench/workbench/org/eclipse/jem/workbench/utility/JemProjectUtilities.java
index 4fdb59a..df48418 100644
--- a/plugins/org.eclipse.jem.workbench/workbench/org/eclipse/jem/workbench/utility/JemProjectUtilities.java
+++ b/plugins/org.eclipse.jem.workbench/workbench/org/eclipse/jem/workbench/utility/JemProjectUtilities.java
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.jem.workbench.utility;
 /*
- * $RCSfile: JemProjectUtilities.java,v $ $Revision: 1.10 $ $Date: 2005/09/14 23:30:27 $
+ * $RCSfile: JemProjectUtilities.java,v $ $Revision: 1.10.6.1 $ $Date: 2009/10/30 01:49:31 $
  */
 
 import java.net.URL;
@@ -470,9 +470,17 @@
 	private static void collectClasspathEntryURL(IClasspathEntry entry, List urls) {
 		IPath path = entry.getPath();
 		if (null == path.getDevice()) {
-			IFile jarFile = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
-			if (jarFile.exists()) {
-				path = jarFile.getLocation();
+			// workspace resource - is the IPath a file, folder, or a class folder whose location is the project root?
+			if(path.segmentCount() == 1) {
+				// It's a class folder whose location is the project root
+				path = ResourcesPlugin.getWorkspace().getRoot().getProject(path.lastSegment()).getLocation();
+			}
+			else {
+				// It's a file or folder - capture it's absolute location
+				IFile jarFile = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+				if( jarFile.exists() ){
+					path = jarFile.getLocation();
+				}
 			}
 		}