[armedbear-devel] Inclusion of JSS with ABCL contrib

Mark Evenson evenson at panix.com
Fri May 27 18:10:49 UTC 2011


As of [r13303][], the ABCL contribs contain a version of JSS that is not 
dependent on external jars.

[r13303]: http://trac.common-lisp.net/armedbear/changeset/13303

I've revamped the contrib mechanism to automagically load all packaged 
contrib ASDF definitions as long as "abcl-contrib.jar" ends up in the 
same directory as "abcl.jar" via the new :ABCL-CONTRIB module.

To use, one need to build the 'abcl.contrib' target, and then

CL-USER> (require :abcl-contrib)

place JSS in the ASDF path.

Then

CL-USER> (require :jss)

will load JSS, compiling if necessary to the ASDF cache.  The use of 
REQUIRE is actually just a shortcut for loading JSS via ASDF so

CL-USER> (ASDF:LOAD-SYSTEM :JSS)

will do the same thing.

I'm calling this jss-2.0.0 because a) it no longer uses JScheme or 
BeanShell meaning that the underlying implementation has changed and b) 
because it is now packaged as JSS instead of CL-USER.  But other than 
that, I intend the behavior of jss-2.0.0 to match [jss-1.0][1].  For 
current users of JSS wishing to ease migration, there is a 
JSS:ENSURE-COMPATIBILITY function which should pollute^H^H^H^H^Himport 
CL-USER with the proper JSS symbols.

[1]: http://lsw2.googlecode.com/svn/trunk/jss/

For documentation on JSS look the top of 'abcl/contrib/jss/invoke.lisp'. 
  The essential featureis that one gets a macro ('#"') that dynamically 
introspects all loaded classes for either instance or static methods to 
call with the instances determined in a DWIM manner.  A brief example of 
JSS usage would be

CL-USER> (mapcar #"toString"
            (jss:set-to-list (#"entrySet" (#"getProperties" 'System))))

would return a Lisp list of all JVM properties as Lisp strings.

I would hope that current users of JSS poke around at my repackageing 
now and consider migrating to the ABCL contrib version when abcl-0.26 is 
released.   I intend to write some standalone documentation on using JSS 
to get it used by a wider audience, as well as some coverage on the 
abcl-dev blog.

JSS currently includes a extension for including jar files in ASDF 
definitions.  There is no logical necessity for this being part of JSS. 
  The only thing that would need to separate this out into ASDF proper 
would be to replace JAVA:ADD-TO-CLASSPATH with a generic method that 
would allow dynamically added classes to be introspected by JSS.  When I 
tackle the project of defining JVM dependencies like jar archives I will 
preserve the current semantics of JSS ASDF, although the implementation 
will probably be moved "closer" to core ABCL

-- 
"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."




More information about the armedbear-devel mailing list