This site requires JavaScript, please enable it in your browser!
Greenfoot back
sjaaksm
sjaaksm wrote ...

2015/8/27

Lambda expressions in Greenfoot

sjaaksm sjaaksm

2015/8/27

#
Is it in some way possible to use Java 8 features, such as lambda expressions, in Greenfoot? When I try this in my current Greenfoot version, the compiler complaints about the -source 1.6 option which GF apparently uses when calls the compiler.
fejfo fejfo

2015/8/27

#
I don't know but mabe greenfoot without JDK will let you use the last JDK version ? ( I have the same problem if I want to use try-with resurses)
roefer roefer

2015/9/9

#
You can add bluej.compiler.options= to your greenfoot.properties to switch off using Java in 1.6 mode. However, it seems that the Ctrl+Space java doc entries are not shown for classes compiled with Java 8. Probably Greenfoot itself has simply to be compiled with Java 8 once. Any chance of a Greenfoot 2.4.3? The Greenfoot 3 preview uses Java 8 though. However, the editor is currently behaving a little strange (opening in the background, sometimes tabs close when selecting them).
You need to login to post a reply.