java 9

How to use a Java REPL tool like JShell with Java 8 alvin March 1, 2019 - 7:37pm

As a quick note today, if you want to use a tool like the Java 9 JShell in Java 8, BeanShell is the best tool I know. For more information on how to use BeanShell with Java 8, see that link, and/or these links:

Passing an anonymous function to SwingUtilities.invokeLater (in Scala)

As a quick note, if you ever need to call the invokeLater of the Java SwingUtilities class in Scala, you can pass it an anonymous function (lambda) like this:

SwingUtilities.invokeLater(() => {
    // your gui-updating code here, such as:
    for (c <- newsControllers) c.updateContent()

(I haven’t worked with Java 8 lambdas too much, but I assume that the Java lambda syntax is similar to that.)