Index: gli/trunk/src/org/greenstone/gatherer/Gatherer.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/Gatherer.java	(revision 16989)
+++ gli/trunk/src/org/greenstone/gatherer/Gatherer.java	(revision 16990)
@@ -749,4 +749,8 @@
 	    }
 	    url = null;
+	}
+	catch(ConnectionException connectException) {
+	    
+	    DebugStream.println(connectException.getMessage());
 	}
 	catch (Exception exception) {            
Index: gli/trunk/src/org/greenstone/gatherer/gui/Preferences.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/gui/Preferences.java	(revision 16989)
+++ gli/trunk/src/org/greenstone/gatherer/gui/Preferences.java	(revision 16990)
@@ -650,4 +650,10 @@
 	public void actionPerformed(ActionEvent event)
 	{
+	    // Several options requiring restarting the GLI to apply: 
+	    // interface font, interface language, changed gliserver url or library url
+	    boolean restart_required = false;
+	    String restart_message = "";
+
+	    
 	    // Connection preferences
 	    String program_str = program_field.getText();
@@ -657,5 +663,24 @@
 	    Configuration.setPreviewCommand(program_str);
 
+
+	    String old_library_url = Configuration.library_url.toString();
 	    String library_url_string = library_path_field.getText();
+	    if(!old_library_url.equals(library_url_string)) {
+
+		// If the server is remote and the library path's been changed, then GLI client needs restart
+		// If the server is local, GLI is going to work with the collection of GSDLPath anyway, 
+		// even if the library path for previewing has changed
+		if (Gatherer.isGsdlRemote) {
+		    restart_required = true;
+		    restart_message = Dictionary.get("Preferences.General.Manual_Restart_Required");
+		}
+		if(Gatherer.c_man.getCollection() != null) {
+		    // if the gliserver url has changed while a collection is open, 
+		    // close the open collection of the old library URL
+		    Gatherer.c_man.saveCollection();
+		    Gatherer.c_man.closeCollection();
+		    Configuration.setString("general.open_collection"+Configuration.gliPropertyNameSuffix(), true, "");
+		}
+	    }
 	    if (library_url_string.equals("")) {
 		Configuration.library_url = null;
@@ -674,5 +699,18 @@
 
 	    if (Gatherer.isGsdlRemote && !Gatherer.GS3) {
+		String old_gliserver_url = Configuration.gliserver_url.toString(); 
 		String gliserver_url_string = gliserver_url_field.getText();
+		if(!old_gliserver_url.equals(gliserver_url_string)) {
+		    restart_required = true;
+		    restart_message = Dictionary.get("Preferences.General.Manual_Restart_Required");
+
+		    if(Gatherer.c_man.getCollection() != null) {
+			// if the gliserver url has changed while a collection is open, 
+			// close the open collection of the old gliserver URL
+			Gatherer.c_man.saveCollection();
+			Gatherer.c_man.closeCollection();
+			Configuration.setString("general.open_collection"+Configuration.gliPropertyNameSuffix(), true, "");
+		    }
+		}
 		if (gliserver_url_string.equals("")) {
 		    Configuration.gliserver_url = null;
@@ -688,4 +726,5 @@
 		Configuration.setString("general.gliserver_url", true, gliserver_url_string);
 	    }
+	    
 
 	    boolean site_changed = false;
@@ -698,5 +737,5 @@
 		Configuration.setSiteAndServlet(new_site, (String)servlet_combobox.getSelectedItem());
 	    }
-
+	   
 	    Configuration.set("general.use_proxy", true, use_proxy_checkbox.isSelected());
 	    Configuration.setString("general.proxy_host", true, proxy_host_field.getText());
@@ -709,6 +748,4 @@
 	    Configuration.set("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC, view_extracted_metadata_checkbox.isSelected());
 
-	    // Two options requiring restarting the GLI to apply: interface font, and interface language
-	    boolean restart_required = false;
 
 	    // GLI interface font
@@ -717,4 +754,5 @@
 		Configuration.setString("general.font", true, font_field.getText());
 		restart_required = true;
+		restart_message = Dictionary.get("Preferences.General.Restart_Required");
 	    }
 
@@ -724,9 +762,10 @@
 		Configuration.setLocale("general.locale", Configuration.GENERAL_SETTING, ((DictionaryEntry) language_combobox.getSelectedItem()).getLocale());
 		restart_required = true;
+		restart_message = Dictionary.get("Preferences.General.Restart_Required");
 	    }
 
 	    // Inform the user that a restart is required, if necessary
 	    if (restart_required) {
-		JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("Preferences.General.Restart_Required"), Dictionary.get("General.Warning"), JOptionPane.WARNING_MESSAGE);
+		JOptionPane.showMessageDialog(Gatherer.g_man, restart_message, Dictionary.get("General.Warning"), JOptionPane.WARNING_MESSAGE);
 	    }
 
@@ -766,5 +805,5 @@
 	    if (Gatherer.GS3 && site_changed && Gatherer.c_man.getCollection() != null && !Gatherer.isGsdlRemote) {
 		// shut down the collection
-		System.err.println("shutting down teh collection");
+		System.err.println("shutting down the collection");
 		Gatherer.g_man.saveThenCloseCurrentCollection();
 	    }
