Sunday Apr 26, 2015

YouTube: How to Setup and Use Minecraft Forge

Quite impressed by Minecraft Forge, as well as how well it integrates via the Gradle plugin into NetBeans IDE:

Saturday Apr 25, 2015

Seamless Minecraft Forge in NetBeans

Minecraft Forge is a common open source API focused on allowing mods to be created without the need for the source code of Minecraft to be edited. 

Happy to report that Minecraft Forge works seamlessly in NetBeans IDE. Take the following steps:

  1. Download and unzip Forge 1.8 from

  2. In the folder where you unzipped the above, run "gradlew setupDecompWorkspace --refresh-dependencies".

  3. Start NetBeans IDE (I am using NetBeans IDE 8.0.2). Go to Tools | Plugins and install "Gradle Support".

  4. Go to File | Open Project. Browse to the folder where you unzipped the above, which will now be recognized as a Gradle project. Open the project. Wait a moment for the Gradle plugin in NetBeans IDE to figure out the structure of the Gradle project you have opened.

  5. Right-click the Gradle project and go to Tasks | run | runClient. After a moment, Minecraft starts up!

Illustrative screenshot, click to enlarge it:

Next, you'll want to map the "runClient" task to the "Run Project" command in NetBeans IDE, so that running your mods is as simple as pressing F6. Right-click the project and choose Properties. The Project Properties dialog opens:

Click "Manage Built-In Tasks" above. Now look for "Run" and then type "runClient" in the Tasks field, as shown below:

Click OK. Press F6 (which is mapped by default to "Run Project") and the "runClient" task will be run! 

Congratulations to Attila Kelemen from Hungary, for making such a nice NetBeans plugin for Gradle. 

Now mod away

Friday Apr 24, 2015

Nashorn from the Perspective of the Java EE Developer

What is it that's interesting about Nashorn, which is now built into Java 8, for a Java EE developer?

Adam Bien's response:

First, Nashorn is just JavaScript in Java 8. A very fast one and very well integrated with Java. For a Java EE developer, the first interesting thing is automation. For instance, yesterday I had to find some problems in my log files, so I built a quick parser with Nashorn and Java 8, and it was a very pragmatic solution, it took me 20 minutes, and it was ready to go. Then, you know, deployment, starting servers. You can use Nashorn as a system scripting language, which is very very convenient. This is the most obvious and, I would say, least intrusive usage of Nashorn. Then, of course, you can embed Nashorn into your application. What you gain from that—flexible checks, validation rules, algorithms. It is easier to use Nashorn than to write your own parsers, for instance. And what you can also do, of course, is use Nashorn to start Java. One example would be—I created an integration solution where you can very easily map, via JavaScript, input to output, and be able to read a database and output it to Excel, without recompiling the solution, for instance. Wherever you need flexibility and you don't want to redeploy the application, Nashorn might be the right answer.

From a recent interview by Coman Hamilton (from JAX) with Adam Bien, here on YouTube

Thursday Apr 23, 2015

Porting Knockout.js Examples to DukeScript

I hold this truth to be self-evident—a technology without samples is doomed to failure.

Better still is to have examples that relate to something that your target audience is already familiar with.

In the case of the Knockout.js community, these are the samples that everyone knows:

And... here are the DukeScript equivalents, in progress, most are already there, while others are still being worked on:

Feel free to clone them, change them, enhance them, and use them as the basis of your own applications. Notice, in particular, that all the coding you'll do is in Java and not in JavaScript! 

Wednesday Apr 22, 2015

New Spring Boot Integration for NetBeans IDE

Aggelos Karalias, one of the attendees at NetBeans Day Greece, has made a brilliant plugin for NetBeans IDE that provides code completion for Spring Boot configuration properties, click to enlarge the screenshot below:

Congrats, Aggelos! (And great to have met you in Greece!) As you can see above, it works perfectly.

I checked out the sources here, built, and installed them:

And then I used this project by Michael Simons, to make the screenshot above:

Also, this article is useful about Spring Boot and NetBeans, as well as other technologies, such as AngularJS:

Tuesday Apr 21, 2015

Mapping Knockout.js Concepts to Java

Here's a table that should help you when expressing your JavaScript-based Knockout.js applications in Java via DukeScript.

Knockout.js DukeScript Example
Observable property @Property
@Property(name = "itemToAdd", type = String.class)
Observable array property @Property with 'array' attribute
@Property(name = "items", type = String.class, array = true)
Computed property @ComputedProperty
static String fullName(String firstName, String lastName) {
    return firstName + " " + lastName;
Function @Function
static void addItem(Data model) {
    String itemToAdd = model.getItemToAdd();
    List items = model.getItems();
    if (itemToAdd!=null&&itemToAdd.length()>0){

Want to see the above in action? Watch this new screencast created today:

Monday Apr 20, 2015

Hello, Knockout.js Users Everywhere!

Are you interested in increasing the scope of adoption of Knockout.js? If so, you should be interested in the screencast below, which shows you how the Java community can use Knockout.js, without needing to code in JavaScript. After all, the Java community can benefit a lot from the two-way databindings provided by Knockout.js but is prevented from doing so by needing to switch to a different language for coding in Knockout.js. At the same time, there may also be a segment of the Knockout.js community that in retrospect prefers Java over JavaScript and might by means of the below remain within the Knockout.js community thanks to the possibility of using Java.

Either way, enabling your technology to be exposed to the Java community is surely a big win! 

In short, watch this new screencast, created today!

Sunday Apr 19, 2015

YouTube: NetBeans Days Greece (in 3 Minutes)

The first of many more NetBeans Days in Greece came to an end yesterday... and here's a 3 minute impression of the event, with many thanks to Mark Stephens from IDR Solutions (with a trip report here) for recording the interviews:

Thanks to John Kostaras from JCrete for organizing and also speaking, as well as Emmanuel Hugonnet from Red Hat, Mark Stephens from IDR Solutions, Vasilis Souvatzis with his first ever presentation at a conference, and Jaroslav Tulach, founder and initial architect of NetBeans. 

Also a BIG shout out to the Anderson Software Group for sponsoring the event. Thanks Paul and Gail, we promoted your organization and books and everyone applauded on hearing of your support for this event!

Saturday Apr 18, 2015

Contact List in DukeScript

Here's a small Contact List app, created in DukeScript, with a bit of help from Jaroslav Tulach. It is shown below running in the browser on my desktop, as well as in the JavaFX WebView:

Here's the sources, unzip them, you'll have Maven projects to work with. 

I don't have Android setup and no Mac OSX available, so I didn't include the related Maven projects for those devices. 

Soon I will blog about the code used in this example and make a screencast about it. 

Friday Apr 17, 2015

Java in the Trenches

Java has been driven into the trenches, some years ago already. (Slightly under hundred years after the photo on the left was taken, in 1914.)

More or less the general consensus appears to be that the frontend battle has been won by JavaScript.

So, what's the role for Java in this brave new world? More or less the general consensus appears to be that Java has great value on the backend. The Java EE Platform is awesome in that it consists of specifications agreed upon across the industry, whereas the JavaScript ecosystem is crazy mad cowboy land.

However, what happens when those frontend developers, who have, without any resistance, moved to JavaScript, discover the value of Node.js over the value of the Java EE Platform? What happens when they see the value of doing the frontend and the backend in the same language, i.e., JavaScript? What happens when they rate that value higher than the value of the industry-based specification-approach promised by the Java EE Platform? When the value of an agreed upon industry-wide platform, i.e., the Java EE Platform, weighs less than the value of having a common programming model right across the application, from its front to its back... then what happens? Java will have no place in the browser and will be pushed back further still, into the purely scientific world, focused narrowly on simulation software, relevant to back-office banking and defense force software, that is, desktop solutions and console solutions, only, where the NetBeans Platform is the purest Java solution, in terms of application framework. It will then be competing with Cobol and AS/400 RPG and their various other crusty friends. 

It's hard, but let's be honest. 

What is to be done? Instead of giving up on the frontend and retreating to the backend, from which a further retreat will inevitably follow, into obscurity, the frontend should be defended, simply because the Java ecosystem is so much better than the JavaScript ecosystem, as Java developers know, by Java developers. How? By means of DukeScript.

Thursday Apr 16, 2015

Best NetBeans IDE Tweet, Ever!

The point here is the NetBeans is not only an IDE, with the 'heaviness' that the term tends to imply. It is also a text editor, a direct competitor to tools like Sublime, once you discover the Favorites window that enables you to work with individual files, instead of projects:

Wednesday Apr 15, 2015

YouTube: WADL-Driven REST Client Generation

Did you know you can (1) let Jersey generate a WADL file and (2) let NetBeans generate REST client stubs from the WADL file? No? Well, watch this screencast to see it all in action:

Tuesday Apr 14, 2015

YouTube: Defect Driven Design!

Every now and then, this very specific YouTube clip needs to be republished to the world, simply because it is so awesome!

Monday Apr 13, 2015

Free: Inject Extra Power into the Browser!

Are you getting everything you can out of your browser? Sure, the browser can do so much more with new and richer content than a few years ago. However, did you know you can connect it to your development environment?

Install the free NetBeans Connector plugin into the Chrome browser and you're good to go:

Once you've installed the above, what can you do with it?

Quite a lot! Here are some small examples:

So, go here, and inject new power into the browser, for free, today!

Friday Apr 10, 2015

NetBeans Platform Certified Training at Fontys University of Applied Sciences

Yet another NetBeans Platform Certified Training was held recently. At Fontys University of Applied Sciences in Venlo, a group of students is working on a logistics simulation software called LIMO, which stands for "Logistics Impact Model":

The purpose of the project, created together with and for TNO, is to graphically visualize logistics chains, simulate costs, and generate advice on how to reduce or eliminate expenses.

The source code is on GitHub:

Here's the group:

In two days, all the major NetBeans Platform topics were covered, many hands-on workshops were done, and by the end, after a lot of interaction and discussion, the group was able to plan several new features for the project. For example, a NetBeans-based Project System will be added and undo/redo functionality will be integrated into the Visual Library Scene. A prototype of the new features, as well as the existing Scene with its simulation capabilities is shown below: 

Are you also creating client-side applications and would you like to be able to immediately focus on the domain/business logic, rather than all the infrastructure and plumbing that desktop applications require? For domain-driven desktop programming, the NetBeans Platform is a perfect solution. Either get the awesome book "NetBeans Platform for Beginners" or the equally awesome JavaFX-oriented book "JavaFX Rich Client Programming on the NetBeans Platform". Or get both. And take a NetBeans Platform Certified Training, to quickly put all the pieces together, 100% free if you're a group of developers at an educational institution.

Thursday Apr 09, 2015

Sample REST Application

For some time in NetBeans IDE, there's been this example available in the New Project dialog:

The template above creates a new NetBeans Platform application that consumes services from the "Message Board" application that is available in the "Web Services" category in the New Project dialog.

I looked at the code of the "Sample REST Application" and, since it had been written some years ago, a lot of XML files are included, instead of annotations on TopComponents. And there are other problems in the example, too. Rather than updating it within the NetBeans sources, I think it's better to have the code available separately, so it can be worked on and extended further by anyone out there. So, here it is:

Here's the structure of the sample REST application, together with the Java EE application that provides the services:

Notice that the NetBeans Platform application uses Maven as its build system.

When both applications are deployed, you see the following, click to enlarge the image:

Related issue:

Wednesday Apr 08, 2015

22 June, 2015: NetBeans Day Brazil

In February, we had NetBeans Day Netherlands, while March was NetBeans Day Germany. In April, i.e., next week, it's NetBeans Day Greece, while NetBeans Day UK is in May. And, guess what, you can now also sign up for... NetBeans Day Brazil, to be held in June, the day before JavaOne Brazil:

Go here to sign up for this free event:

Tuesday Apr 07, 2015

New Book on JavaFX

Diese Buch bietet Ihnen einen schnellen Einstieg und umfassenden Überblick über die gesamte JavaFX-API. Schritt für Schritt zeigt es, wie Sie eine erste Anwendung bauen, wie Sie das eigene Datenmodell in der Oberfläche darstellen und editierbar machen und wie Sie die Anwendung mit JavaFX-Features anreichern, um ein modernes und ansprechendes User Interface zu erhalten.

Dabei lernen Sie u.a., folgende Möglichkeiten von JavaFX einzusetzen:

• Controls nutzen und anpassen
• Formulare layouten und eigene Layouts erstellen
• Charts/Diagramme erzeugen
• Animationen erstellen
• Audio und Video einbinden
• Anwendungen mit CSS stylen
• Nebenläufigkeit nutzen

Anhand eines durchgängigen Beispiels können Sie die besprochenen Inhalte praktisch nachvollziehen und vertiefen. Darüber hinaus können Sie das Buch bei der späteren Projektarbeit zum Nachschlagen einsetzen.

Das Buch richtet sich gleichermaßen an Einsteiger und Umsteiger in JavaFX.

The book is by NetBeans Dream Team member Toni Epple, and is available in German right now, as you can see above, from here:

Monday Apr 06, 2015

Mocha and Chai and NetBeans -- Unit Testing for JavaScript

Mocha and Chai work great with the unit testing support that is a standard part of NetBeans IDE for JavaScript files, as Adam Bien shows below:

Adam's blog on this is here:

Friday Apr 03, 2015

How My Life Would Have Been So Much Better If We Had Used the NetBeans Platform

Came across this today from some years ago. If I may say so myself, about something created and delivered by me myself, I'd say this is still really excellent content and should help anyone getting started creating their applications on the NetBeans Platform:

Once you've watched the above, do yourself a favor and get this book:


Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« May 2015