Bug 62086 [User library] Jars in User Libraries Can't be ordered
Inorder to get a patch to Easymock to work the patch jar must be first in the classpath. There does not appear to be a way to do this with the User Libraries. I'm using the I20040506 build.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/UserLibraryPreferencePage.java
UserLibraryAdapter adapter= new UserLibraryAdapter();
		String[] buttonLabels= new String[] {
				PreferencesMessages.UserLibraryPreferencePage_libraries_new_button, 
				PreferencesMessages.UserLibraryPreferencePage_libraries_edit_button, 
				PreferencesMessages.UserLibraryPreferencePage_libraries_addjar_button, 
				PreferencesMessages.UserLibraryPreferencePage_libraries_remove_button, 
				null,
				PreferencesMessages.UserLibraryPreferencePage_libraries_load_button, 
				PreferencesMessages.UserLibraryPreferencePage_libraries_save_button
		};
		
		fLibraryList= new TreeListDialogField(adapter, buttonLabels, new CPListLabelProvider());
		fLibraryList.setLabelText(PreferencesMessages.UserLibraryPreferencePage_libraries_label); 
		
		String[] names= JavaCore.getUserLibraryNames();
		ArrayList elements= new ArrayList();
		
		for (int i= 0; i < names.length; i++) {
			IPath path= new Path(JavaCore.USER_LIBRARY_CONTAINER_ID).append(names[i]);
			try {
				IClasspathContainer container= JavaCore.getClasspathContainer(path, fDummyProject);
				elements.add(new CPUserLibraryElement(names[i], container, fDummyProject));
			} catch (JavaModelException e) {
				JavaPlugin.log(e);
				
			}
		}
		fLibraryList.setElements(elements);
		fLibraryList.setViewerSorter(new CPListElementSorter());