Re: simple hello world fails - can't find LISP_HOME

Mark Evenson <[email protected]>
Newsgroups gmane.editors.j.devel
Message-ID <7A0CB136-F75B-4B1A-8C89-ACE98D83ADFD__25757.62846177$1547730353$gmane$org@panix.com>

> On Jan 16, 2019, at 14:21, Stephen Varey <[email protected]> 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."
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.