How to call ATS functions from Java

FYI.

With some help from Alex Ren, I did a simple example that demonstrates a
straightforward
approach to calling ATS functions from Java:

https://github.com/githwxi/ATS-Postiats/tree/master/doc/PROJECT/SMALL/calculator
https://github.com/githwxi/ATS-Postiats/tree/master/doc/PROJECT/SMALL/calculator/Java

If you already know how to call C from Java, then this example should be
easily accessible
to you. Basically, I constructed a method (eval) in Java by wrapping around
some ATS code
I wrote earlier (a calculator). If you go a bit further, you can implement
a simple GUI in Java
for this calculator constructed in ATS, which is precisely what Alex did:

Cheers!

For fun, I added another example of calling ATS from Java:

https://github.com/githwxi/ATS-Postiats/tree/master/doc/PROJECT/SMALL/GameOf24
https://github.com/githwxi/ATS-Postiats/tree/master/doc/PROJECT/SMALL/GameOf24/Java

This one is a bit simpler than the previous example as it only deals with
integer conversion
(jint -> int); the previous example dealt with string conversion (jstring
-> char*).

Cheers!