Changeset 14234


Ignore:
Timestamp:
11/09/12 14:43:09 (8 years ago)
Author:
Mark Evenson
Message:

Fixes #263: ABCL-CONTRIB now loads with wildcards in CLASSPATH.

Location:
trunk/abcl/contrib/jss
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/contrib/jss/invoke.lisp

    r14226 r14234  
    378378
    379379(defun do-auto-imports ()
    380   (flet ((import-class-path (cp)
    381      (map nil
    382     (lambda(s)
    383       (setq s (jcall "toString" s))
     380  (labels ((expand-paths (cp)
     381           (loop :for s :in cp
     382              :appending (loop :for entry
     383                            :in (let ((p (pathname s)))
     384                                  (if (wild-pathname-p p)
     385                                      (directory p)
     386                                      (list p)))
     387                            :collecting entry)))
     388         (import-classpath (cp)
     389     (mapcar
     390    (lambda (p)
    384391      (when *load-verbose*
    385         (format t ";Importing ~a~%" s))
     392        (format t ";; Importing ~A~%" p))
    386393      (cond
    387         ((file-directory-p s) )
    388         ((equal (pathname-type s) "jar")
    389          (jar-import (merge-pathnames (jcall "toString" s)
     394        ((file-directory-p p) )
     395        ((equal (pathname-type p) "jar")
     396         (jar-import (merge-pathnames p
    390397                                                  (format nil "~a/" (jstatic "getProperty" "java.lang.System" "user.dir")))))))
    391     (jcall "split" cp
    392                        (string (jfield (jclass "java.io.File") "pathSeparatorChar"))))))
    393     (import-class-path (jcall "getClassPath" (jstatic "getRuntimeMXBean" '|java.lang.management.ManagementFactory|)))
    394     (import-class-path (jcall "getBootClassPath" (jstatic "getRuntimeMXBean" '|java.lang.management.ManagementFactory|)))
    395     ))
     398                cp))
     399         (split-classpath (cp)
     400           (coerce
     401            (jcall "split" cp
     402                   (string (jfield (jclass "java.io.File") "pathSeparatorChar")))
     403            'cons))
     404         (do-imports (cp)
     405           (import-classpath (expand-paths (split-classpath cp)))))
     406    (do-imports (jcall "getClassPath" (jstatic "getRuntimeMXBean" '|java.lang.management.ManagementFactory|)))
     407    (do-imports (jcall "getBootClassPath" (jstatic "getRuntimeMXBean" '|java.lang.management.ManagementFactory|)))))
    396408
    397409(eval-when (:load-toplevel :execute)
  • trunk/abcl/contrib/jss/jss.asd

    r14170 r14234  
    22(asdf:defsystem :jss
    33  :author "Alan Ruttenberg, Mark Evenson"
    4   :version "3.0.3"
     4  :version "3.0.4"
    55  :components
    66  ((:module base
Note: See TracChangeset for help on using the changeset viewer.