Compiling with ecj on Termux produces the following error message:
Lambda expressions are allowed only at source level 1.8 or above.
No options were specified when running the tool.
Compiling with switch - 1.8 produces the following output:
ecj -1.8 Composite2
duplicate compliance setting specification: -1.8
Composite2 is the directory where my source code resides.
I tried the following next:
ecj -source 1.8 -target 1.8 Composite2
Compliance level '1.7' is incompatible with source level '1.8'. A compliance level '1.8' or better is required.
The source is available here
Are there any settings or switches I'm missing? I'm unfamiliar with using ecj as a compiler.
Can you help?
There appears to be solutions like Retro Lambda and backporting to make Java 8 source work on 7 or earlier. I have yet to try it though. There's only so much one person can check out. ( See comments below for clarifications).
A workaround might be to install Arch Linux on Termux.. The command prompt can be a bit buggy, though.
You can then install Open JDK 8 and eclipseecj using the package manager pacman.
That worked; ecj now compiles 1.8 code.
I wished to avoid installing the full JDK since it introduces redundancies and consumes additional space.