It looks like you're trying to run Java 8 code on a Java 7 runtime. (Java is backwards-compatible, but not forwards-compatible!

If you're triggering it from the command line you need to set the right environment variables. On Trisquel there are helper applications that can assist you. For example:

sudo update-alternatives --config java

This will show you all the versions of Java you have installed. Simply make sure you select version 8 for your code to work.

If this doesn't fix your problem then I'm guessing you need to change the configuration of your project in Geany. (I've not used that particular IDE before, so I'm going by what the usual solution would be in Eclipse/IntelliJ CE)

Reply via email to