Java Question Simple Library Compiler - Lamda expressions not supported

moster67

Expert
Licensed User
Longtime User
I have jdk1.8.0_66 installed on my PC. It is also set in B4A.
Despite this, when compiling with SLC, I get an error:

Starting step: Compiling Java code.
javac 1.8.0_66
........
.........

lambda expressions are not supported in -source 1.7
(use -source 8 or higher to enable lambda expressions)

I am missing something? Do I need to change all Lamda expressions in my wrapper sources?
 

DonManfred

Expert
Licensed User
Longtime User

JordiCP

Expert
Licensed User
Longtime User
If you also have Java7 installed, I'd try to rename that folder to a different name and check what happens
 

moster67

Expert
Licensed User
Longtime User
If you also have Java7 installed, I'd try to rename that folder to a different name and check what happens
Thanks @JordiCP - Indeed, I also have Java7 installed although it is not in my path. I now already changed the Lamda expressions into Anonymous classes but I will check next time.

I missed that one. Maybe this is still the case? If yes, maybe one day Erel will make the B4X enviroment compatible with Lamdas? I like Lamda.

Anyway, I found out that in Android Studio, you can simple highlight the "->" sign and then type ALT + ENTER and you get an option to automatically convert Lamda into an Anonymous class.
 
Last edited:

moster67

Expert
Licensed User
Longtime User
Reading this page, there is an overview of supported Java 8 Language Features and APIs.
This made be believe that, at least Lamda Epression were compatible by any minSdkVersion...

Anyway, it's not a big deal. You have fantastic products and support and this is what counts :)
 
Top