diff -r a3e236ba705d src/org/armedbear/lisp/Load.java
--- a/src/org/armedbear/lisp/Load.java	Tue Aug 25 11:22:43 2009 +0200
+++ b/src/org/armedbear/lisp/Load.java	Tue Aug 25 11:47:32 2009 +0200
@@ -103,47 +103,74 @@
 					boolean returnLastResult)
         throws ConditionThrowable
     {
-	String dir = null;
+        InputStream in = null;
+        String zipFileName = null;
+        String zipEntryName = null;
+        String dir = null;
+
         if (!Utilities.isFilenameAbsolute(filename)) {
-	    dir =
-                coerceToPathname(Symbol.DEFAULT_PATHNAME_DEFAULTS.symbolValue()).getNamestring();
+	    dir = coerceToPathname(Symbol.DEFAULT_PATHNAME_DEFAULTS.symbolValue())
+		    .getNamestring();
+        }
+
+        // attempt to load from a jar file
+	final String JAR_FILE_URI_SCHEMA = "jar:file:";
+        if (filename.startsWith(JAR_FILE_URI_SCHEMA)) {
+            String s = new String(filename);
+            s = s.substring(JAR_FILE_URI_SCHEMA.length());
+            int index = s.lastIndexOf('!');
+            if (index >= 0) {
+		zipFileName = s.substring(0, index);
+		zipEntryName = s.substring(index + 1);
+		if (zipEntryName.length() > 0 && zipEntryName.charAt(0) == '/')
+		    zipEntryName = zipEntryName.substring(1);
+                if (Utilities.isPlatformWindows) {
+                    if (zipFileName.length() > 0 && zipFileName.charAt(0) == '/')
+                        zipFileName = zipFileName.substring(1);
+                }
+            }
         }
 
 	File file = findLoadableFile(filename, dir);
-        if (file == null) {
+        if (null == file && null == zipFileName) {
             if (ifDoesNotExist)
-                return error(new FileError("File not found: " + filename,
-                                            pathname));
+                return error(new FileError("File not found: " + filename, pathname));
             else
                 return NIL;
         }
+        if (checkZipFile(file)) {
+            // filename = file.getPath();
+            zipFileName = file.getPath();
+            zipEntryName = file.getName();
+        }
+        
+        String truename = filename;
+        ZipFile zipfile = null;
 
-	filename = file.getPath();
-        ZipFile zipfile = null;
-        if (checkZipFile(file))
-        {
+        if (zipFileName != null) {
             try {
-                zipfile = ZipCache.getZip(file.getPath());
+                zipfile = ZipCache.getZip(zipFileName);
+            } 
+	    catch (Throwable t) {
+                return error (new FileError("Zip file not found: " + filename, pathname));
             }
-            catch (Throwable t) {
-                // Fall through.
+            ZipEntry entry = zipfile.getEntry(zipEntryName);
+            if (null == entry) {
+                // try appending "._" to base filename
+                int index = zipEntryName.lastIndexOf('.');
+                if (-1 == index) index = zipEntryName.length();
+                zipEntryName = zipEntryName.substring(0, index).concat("._");
+                entry = zipfile.getEntry(zipEntryName);
             }
-        }
-        String truename = filename;
-        InputStream in = null;
-        if (zipfile != null) {
-            String name = file.getName();
-            int index = name.lastIndexOf('.');
-            Debug.assertTrue(index >= 0);
-            name = name.substring(0, index).concat("._");
-            ZipEntry entry = zipfile.getEntry(name);
-            if (entry != null) {
-                try {
-                    in = zipfile.getInputStream(entry);
-                }
-                catch (IOException e) {
-                    return error(new LispError(e.getMessage()));
-                }
+            if (null == entry) {
+                return error (new FileError("Can't read zip file entry " 
+					    + zipEntryName, pathname));
+            }
+            try {
+                in = zipfile.getInputStream(entry);
+            } 
+	    catch (IOException e) {
+                return error(new LispError(e.getMessage()));
             }
         } else {
             try {
