Changeset 14234 for trunk/abcl/contrib/jss/invoke.lisp
- Timestamp:
- 11/09/12 14:43:09 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/contrib/jss/invoke.lisp
r14226 r14234 378 378 379 379 (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) 384 391 (when *load-verbose* 385 (format t "; Importing ~a~%" s))392 (format t ";; Importing ~A~%" p)) 386 393 (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 390 397 (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|))))) 396 408 397 409 (eval-when (:load-toplevel :execute)
Note: See TracChangeset
for help on using the changeset viewer.