source: branches/streams/abcl/examples/pure-lisp-to-java/README

Last change on this file was 12908, checked in by vvoutilainen, 14 years ago

Add an example for using a java class with CLASSPATH, invoking java
functions from lisp code and finding the java class automagically
as it's in CLASSPATH.

File size: 1.1 KB
Line 
1ABCL Examples Building and Running Instructions
2===============================================
3
4To compile
5
6    cmd$ javac  -cp ../../dist/abcl.jar  Main.java
7
8where the "../../../dist/abcl.jar" represents the path to your
9abcl.jar file, which is built via the Ant based build.  This path
10could be slightly different depending on how the system was
11constructed, and possibly due to operating system conventions for
12specifying relative paths.  However you resolve this locally, we'll
13refer to this as '$ABCL_ROOT/dist/abcl.jar' for the rest of these
14instructions.
15
16This compiles the Java source file "Main.java" into a JVM runtime or
17class file named "Main.class".
18
19To run the example (Main.class for example) from a Unix-like OS use:
20
21    cmd$ export CLASSPATH=.
22    cmd$ $ABCL_ROOT/abcl
23
24then, in abcl repl, use:
25(load "lispfunctions")
26(void-function)
27
28or in Windows use:
29
30    cmd$  set CLASSPATH=.
31    cmd$  $ABCL_ROOT/abcl
32
33then, in abcl repl, use:
34(load "lispfunctions")
35(void-function)
36
37This will result in the Main class being found from the CLASSPATH, and you
38can invoke the functions of the Main class from lisp code.
Note: See TracBrowser for help on using the repository browser.