K khaleel Member Licensed User Longtime User Jun 11, 2017 #1 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
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
K khaleel Member Licensed User Longtime User Jun 11, 2017 #2 the last line says: 'use -source 8 or higher to enable lambda expressions' how to do that ? Upvote 0
R Roycefer Well-Known Member Licensed User Longtime User Jun 11, 2017 #3 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
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.
K khaleel Member Licensed User Longtime User Jun 11, 2017 #4 Roycefer said: 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. Click to expand... I already have one cand configuered correctly : C:\Program Files\Java\jdk1.8.0_91\bin\javac.exe Upvote 0
Roycefer said: 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. Click to expand... I already have one cand configuered correctly : C:\Program Files\Java\jdk1.8.0_91\bin\javac.exe
K khaleel Member Licensed User Longtime User Jun 11, 2017 #5 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
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 .
R Roycefer Well-Known Member Licensed User Longtime User Jun 11, 2017 #6 You can't. Only Erel can and he hasn't, apparently: https://www.b4x.com/android/forum/threads/java-version-and-lambda-expressions.55596/ Upvote 0
You can't. Only Erel can and he hasn't, apparently: https://www.b4x.com/android/forum/threads/java-version-and-lambda-expressions.55596/