B4J Question inline-java lambda expressions

khaleel

Member
Licensed User
Longtime User
this inline code generates the following error. How can I overcome this ?

-----------------------------------------------------------------------
the code
-------------------------------------------------------------------------
public void Sync2TblH(TableView table1,TableView table2) {
ScrollBar t1 = this.findScrollBarH( table1);
ScrollBar t2 = this.findScrollBarH( table2);
t1.valueProperty().bindBidirectional( t2.valueProperty());
table1.getColumns().stream().forEach((c) -> {
System.out.println("Column: " + c);
});

-----------------------------------------------------------------------
the error:
-----------------------------------------------------------------------
B4J version: 5.00
Parsing code. (0.04s)
Compiling code. (0.16s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Compiling generated Java code. Error
javac 1.8.0_91
src\b4j\golden\browser.java:1401: error: lambda expressions are not supported in -source 1.7
table1.getColumns().stream().forEach((c) -> {
^
(use -source 8 or higher to enable lambda expressions)
1 error
 

Roycefer

Well-Known Member
Licensed User
Longtime User
In the B4J IDE, go to Tools>Configure Paths and select a JDK of 8 or higher for the javac.exe option. If you don't have one installed, install one.
 
Upvote 0

khaleel

Member
Licensed User
Longtime User
In the B4J IDE, go to Tools>Configure Paths and select a JDK of 8 or higher for the javac.exe option. If you don't have one installed, install one.

I already have one cand configuered correctly :
C:\Program Files\Java\jdk1.8.0_91\bin\javac.exe
 
Upvote 0

khaleel

Member
Licensed User
Longtime User
I think it has something to do with java compiler options '-source 8' when B4J IDE compiles the code.but I dont know how to force that option from B4J IDE .
 
Upvote 0
Top