I am using Eclipse Mars. The JRE for Eclipse I am using is Oracle's Java 8 /usr/lib/jvm/java-8-oracle/jre and I have set the compiler compliance to 1.8 for the project and for Eclipse. However, when I try to write a lambda, for example:
textField.addActionListener(evt -> Dialog.show("Title", "Body", "OK", "Cancel"));
The build fails with
[javac] /home/hvrigazov/Assistant/mobile/assistant/src/com/cognit/assistant/Assistant.java:43: error: illegal start of expression
[javac] textField.addActionListener(evt -> Dialog.show("Title", "Body", "OK", "Cancel"));