Very High Activity


  Analyzed 2 days ago based on code collected 2 days ago.
Posted 5 months ago
Bck2Brwsr 0.12 has been released. What is new?

Libraries can be pre-compiled and published as Maven artefacts (see Bck2BrwsrLibraries how to). The Knockout4Java Maven archetype has been modified to use the precompiled version of Bck2Brwsr ... [More] rt. jar emulation library and HTML/Java APIs:

$ mvn archetype:generate \
-DarchetypeGroupId=org.apidesign.html \
-DarchetypeArtifactId=knockout4j-archetype \
-DarchetypeVersion=1.1.2 \
# answer few questions...
$ cd nameofyourproject
# run on desktop
$ mvn process-classes exec:java
# run in a browser
$ mvn -Pbck2brwsr clean package bck2brwsr:show
Supporting Bck2BrwsrBlobURLs so one can display images available as in JAR resources.

Happy Year 2015 and please help me get Java Bck2Brwsr!

--JaroslavTulach 21:53, 1 January 2015 (UTC) [Less]
Posted 5 months ago
It's been a great NetBeans year in 2014 and here are the highlights as I see them!

Release of NetBeans IDE 8.0, 8.0.1, and 8.0.2. Continuing
a trend set in place by Oracle, NetBeans 8 was released in parallel
with Java 8 this ... [More] year. Need to refactor all your code to use lambdas and
the Streams API? Look no further than NetBeans 8 to provide all the
tools you need, as well as a great tutorial.

Together with the strong focus on Java 8, the NetBeans 8 release integrates even more closely than before with new web technologies, such as Cordova, as well as HTML5, which is the subject of the next highlight.

Continually growing commitment and innovation around HTML5.
With its strong foundation in the Java ecosystem, NetBeans has over the
past years been expanding its features in step with the needs of its
users. Where once applets and JSP were dominant technologies, now
JavaScript, with all its frameworks from Angular to Knockout and with
all its supporting technologies such as Grunt and Karma, is the central
domain of innovation. And that's where NetBeans is now squarely
positioned, too. NetBeans as a tool for web development? Yes, indeed:

Next, don't be surprised when you see NetBeans providing even
more, and even deeper, support in these areas. For example, how about
integration with Docker? So, don't be surprised when you hear more about that in the coming period...

Very successful JavaOne 2014 and more NetBeans Days. I've blogged about the successful NetBeans Day at Java One 2014
before, but let me reiterate again how successful it was.

Full rooms,
especially James Gosling drawing crowds (so that we had to switch to a
larger room than planned at the last minute), and the great panel
discussions (i.e., sessions with 5 speakers, all talking about a common
theme, e.g., teaching with NetBeans or Maven and NetBeans, etc.)
NetBeans as a tool for "Internet of Things", as the very best tool
available for Maven development, as well as for Java EE and HTML5, these
were very clear themes in NetBeans Day and at JavaOne as a whole.

announced was the new NetBeans Teachers community and the start of a
continual series of NetBeans Days around the world, the first of which
was the recently held NetBeans Day Germany. And, guess what, 12 February will be NetBeans Day Netherlands and 16 March NetBeans Day Germany, again! More details about these here and elsewhere when they become available.

NetBeans Dream Team expansion. Over the past months, 16 new members joined the NetBeans Dream Team, mainly from Germany, the UK, and USA. They bring expertise and insight into all the areas of software technology and are a great benefit in keeping the NetBeans team in touch with ongoing discussions in the community at large. Moreoever, they're great representatives of the core ideas of the NetBeans ecosystem at conferences and events around the world. Over the coming year, I'm looking forward to seeing even more new faces in the NetBeans Dream Team, there's already several who have indicated that they'd like to be part of this community too. The enthusiasm around NetBeans is simply unstoppable!

Books. More books have been written about NetBeans over the past year than ever before. On NetBeans IDE itself, as a tool, see NetBeans IDE 8 Cookbook, by David Salter and Rhawi Dantas; on Java EE and NetBeans, see Java EE 7 Development with NetBeans 8 by David Heffelfinger, on Java EE, HTML5, and NetBeans, see Java EE and HTML5 Enterprise Application Development, by Arun Gupta, JB Brock, and myself, and on NetBeans Platform, see NetBeans Platform for Beginners by Walter Nyland and Jason Wexbridge and JavaFX Rich Client Programming on the NetBeans Platform by Gail and Paul Anderson.

For example, here's the excellent book by Walter Nyland, and Jason Wexbridge, on the ins and outs of the NetBeans Platform, a book you absolutely must get if you're interested in extending/building on top of NetBeans in any way at all:

Can you believe these were all published over the past year? Plus there are probably some that I left out.

Into the New Year, and throughout 2015, I'm excited about the
support for other technologies around NetBeans, thanks to the great
community around NetBeans. In particular (and click the following links for details), support for Scala, Python,
Android, and UML has been increasing further over the last few months and will continue to do so over the coming year. Also, you should expect NetBeans Facebook and the NetBeans YouTube Channel to grow even further than it did over the past year, while the new NetBeans Community Podcasts will power on, too!

More and more, I'm seeing NetBeans as a mechanism for getting to see friends around the world. :-) (And a big highlight in that regard was the GDG Conference in Istanbul, Turkey last month.) Looking forward to seeing them all again this year and making many new ones! [Less]
Posted 5 months ago
JPA 2.1 does not directly support the java.time API.
However, with an AttributeConverter implementation you can easily integrate Java 8 (or any other dates) with JPA:

import java.time.Instant;
import java.time.LocalDate;
import ... [More] java.util.Date;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;

@Converter(autoApply = true)
public class LocalDateConverter implements AttributeConverter<LocalDate, Date> {

public Date convertToDatabaseColumn(LocalDate date) {
Instant instant = Instant.from(date);
return Date.from(instant);

public LocalDate convertToEntityAttribute(Date value) {
Instant instant = value.toInstant();
return LocalDate.from(instant);

The @Converter(autoApply = true) will automatically activate the converter and keep your domain classes clean:

import java.time.LocalDate;

public class Spaceship {

private long id;
private String name;
private int speed;
private LocalDate arrival;

The example above was taken from Java 8 with Java EE 7.
See you at or Virtual Dedicated Workshops / consulting!

Real World Java EE Workshops [Airport Munich]> [Less]
Posted 5 months ago
In 5 minutes, learn how to get started with Python in NetBeans IDE 8.0.2, including for the first time basic code completion.

Get the plugin here:
Posted 5 months ago
The useful utility class: StreamSupport converts Spliterator into a Stream.

Also an java.util.Iterator could be easily converted into a Spliterator using the Spliterators utility.

Particularly interesting is the combination with ... [More] Java EE. An interface Greeter:

public interface Greeter {
String getMessage();

Can be injected as an Instance, which implements the Iterable interface. This allows the conversion into a stream:

public class GreeterExposer {

Instance<Greeter> greeter;

public Stream<Greeter> expose() {
return, false);


A Stream greatly simplifies the direct access and transformation to the contents. The output of all realizations of this interface could be easily joined into a single String:

public class GreetingsService {

Stream<Greeter> greaters;

public String allGreetings() {
return greaters.
map(g -> g.getMessage()).


Three concrete Greeting classes would output something like: "a bad day,leave me alone...,Have a nice day!"

See you at Java 8 with Java EE 7 or Virtual Dedicated Workshops / consulting!

Real World Java EE Workshops [Airport Munich]> [Less]
Posted 5 months ago
I was asked by someone to solve a problem with threads that they were having. They wanted to cancel a Future that was sent to an ExecutorService. I told them to look at a previous posts I had done on the subject. However, they insisted that this was ... [More] different. So I took a look at the code. Alas, it was slightly different, but like most folks including me, they were too close to the problem to see the answer. I looked at it, and at first glance I thought something was askew, but it was not.

The code for this project can be downloaded here: runnable-example
As you can see from the results of the run, the future is canceled, but still keeps running. Then it gets interrupted, and breaks. So the question is why is it still running after being canceled.

Here is the Runnable and the main class to execute it: So the do you have an answer? The answer is at the bottom of the blog. Don't peek... think!
ReferenceHow do you cancel a scheduled Thread in an ExecutorService?How to exercise your Daemons - Callable, Future, and ExecutorServiceExecutorService and CountDownLatch ExampleAnswerSimply because you have canceled it, and even interrupted it; it is still a running thread. It is not scheduled, so you are not canceling it before execution. [Less]
Posted 5 months ago
Watch a quick movie about how, in addition to using Oracle Cloud, Amazon Beanstalk, and Jelastic, you can also use Red Hat's OpenShift directly from within NetBeans IDE.

Get the plugin here:
Posted 5 months ago
A developer knows a set of programming languages:

public class Developer {

private String name;
private Set<String> languages;

public Developer(String name) {
this.languages = new ... [More] HashSet<>(); = name;

public void add(String language) {

public Set<String> getLanguages() {
return languages;

A team has more than one developers. Now we would like to know the aggregate programming language skills for a given team.
Stream#flatMap is
perfect for "flattening" collections:

import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.assertTrue;
import org.junit.Test;

public class FlatMapTest {

public void flatMap() {
List<Developer> team = new ArrayList<>();
Developer polyglot = new Developer("esoteric");

Developer busy = new Developer("pragmatic");


List<String> teamLanguages =
map(d -> d.getLanguages()).
flatMap(l ->

See you at Java EE Workshops at Munich Airport, Terminal 2, particularly at: Java 8 with Java EE 7 or Virtual Dedicated Workshops / consulting

Real World Java EE Workshops [Airport Munich]> [Less]
Posted 5 months ago
Free Online Event: 12. Januar, Airhacks Q&A Show:
20. January, Copenhagen,, Session: Java FX with Java 8
Free Event: 29. January, Munich, OOP, "Big, Fast and Furious", Oracle Day, Session: ... [More] Microservices Architecture with Java EE 7 and Java 8
26. - 28 January: Java EE Special Events at Munich's Airport: Java EE 7 on Java 8, Java EE 7 Quality and Testing and Microservices with Java EE 7. Many registrations received already, room is upgraded :-)
Free Event: 12. February, Amsterdam, Keynote: "Java EE 7 and Angular.js with NetBeans"
26.- 27. February, Hamburg, Java EE Patterns Workshops

See you at Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting

Real World Java EE Workshops [Airport Munich]> [Less]
Posted 5 months ago
New NetBeans Dream Team member Mark Stephens, from IDR Solutions in the UK, did an excellent overview of key NetBeans features during the recent Google Dev Fest in Istanbul, Turkey. Most of it can be watched on YouTube, right here: