simple hello world fails - can't find LISP_HOME
Mark Evenson
evenson at panix.com
Thu Jan 17 13:07:09 UTC 2019
> On Jan 16, 2019, at 14:21, Stephen Varey <srvarey at gmail.com> wrote:
>
> I have built abcl from source
> Then went to write my first simple hello world....
>
> public class Tester {
>
> void simple() {
> Interpreter interpreter = Interpreter.createInstance();
> LispObject result = interpreter.eval("(format t \"Hello, world!~%\")");
> System.out.println(result);
> }
>
> public static void main(String[] args) {
>
> new Tester().simple();
> }
> }
>
> The execution fails with the following.
> ant -f C:\\git\\abcl -Djavac.includes=org/armedbear/lisp/util/Tester.java -Dnb.internal.action.name=run.single -Drun.class=org.armedbear.lisp.util.Tester run-single
> init:
> Deleting: C:\git\abcl\build\built-jar.properties
> deps-jar:
> Updating property file: C:\git\abcl\build\built-jar.properties
> Compiling 1 source file to C:\git\abcl\build\classes
> compile-single:
It’s a little hard to tell what’s going on, but I *think* you are attempting to build your Tester.java class as part of the ABCL build, perhaps using a modified version of the <file:build.xml> to drive, but it is hard to tell without a copy of your source. If you could put up such a copy online, it would be helpful to diagnose things as I would have a reproducible recipe locally.
Developers usually build their application not by modifying the contents of `abcl.jar`, but an additional archive. It is fairly trivial to rebould a copy of `abcl-contrib` that contains a customized contribution.
Since your Tester.java is purely Java side, you might be able to get away with a simple invocation of `java` which includes `abcl.jar` in its class path like:
```
java -cp SOMEWHERE/abcl.jar:. Tester
```
I suspect you are trying to accomplish all of this via Netbeans projects. While possible, one has to understand a fair amount of the details, so being able to reproduce from the command line for a given online copy of the source would be ideal to get something working.
Yours,
Mark
--
"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