I was able to reproduce the issue, and it seems to be due to how the
LZMA-enabled executable works.
When you build using LZMA, the application (i.e. the VM and all the
class and resource files) is compiled into a DLL file which is then
compressed with LZMA and embedded into an executable whose job is to
extract the DLL, decompress it into a temporary file, load it, and
start the application.
However, on Windows 10, we get this:
$ ./build/windows-i386-lzma/example/example.exe
unable to load C:\cygwin64\tmp\223580F.tmp: unknown error
Apparently the OS won't let us load the DLL from its temporary
location on disk, perhaps as a security measure.
The workaround is to omit the lzma=... flag from your make command.
The resulting executable will be large, but it will run.
Meanwhile, if anyone on this list happens to know why loading from a
temporary DLL as described above does not work on Windows 10, I'd be
interested to know. We used to use UPX for executable compression,
but it got so buggy and out of date that I gave that up and made my
own hacky alternative. Apparently neither option works reliably, so
perhaps we should just give up and leave the executables uncompressed.
BTW, you also have the option of compressing only the embedded Java
code with LZMA (and leaving the native code uncompressed). The total
executable size won't be as small as when everything is compressed,
but it's far more reliable since it doesn't rely on temporary DLLs or
any OS-specific tricks. See the documentation for the lzma option in
the Avian README.md for more details and let me know if you need help
using it.
Also BTW, you can use JDK 8 to build the examples, but you have to
edit avian/makefile and avian-swt-examples/
app.mk to add the "-target
1.7 -source 1.7" options to javac.