I am very proud to announce the release of TrueLicense version 2.4! If you care about details, there is the usual Release Notes generated from the issue tracker. However, there is a bigger story behind the pesky details and it deserves to be told in this blog posting.
There are many ways to update a value atomically, so without introducing racing conditions in multithreaded environments. A well-performing way of doing this in Java is to use an
AtomicReference or one of its companion classes in the package
java.util.concurrent.atomic. However, using an
AtomicReference is quite cumbersome. But with Scala, you can easily factor out the cumbersome usage pattern like follows.
Since it’s release about a year ago, a lot of buzzing has been going on about new language features in Java 7 – least of which about the new
try-with-resources statement. Here’s how you can implement it within Scala.
I have updated the archetype for JavaFX 2.0 applications in Scala to version 0.4 in order to reflect the release of JavaFX 2.0. Note that the environment variable
JAVAFX_HOME must now refer to the base installation directory of the JavaFX 2.0 SDK, not the
bin subdirectory anymore. Here are the updated Maven coordinates for the archetype:
<dependency> <groupId>de.schlichtherle</groupId> <artifactId>javafx-scala-demo</artifactId> <version>0.4</version> </dependency>
I have created a simple Maven archetype for building standalone JavaFX 2.0 applications written in Scala. The generated Scala code is a close translation of the Java code for the Colorful Circles demo in Oracle’s Getting Started with JavaFX tutorial. Here’s how it looks:
I’m sick of Java’s low abstraction level which implies lots of coding overhead/boilerplate, so I’ve just started looking at Scala. While the language is definitely appealing, setting up my tool chain was not such a pleasant ride because the information I needed was dispersed across many web pages and well hidden between obsoleted or misleading information. This post shows what I did to succeed so you can use it as a guide line.