Bethan Palmer Bethan is a Java developer and a Java Champion. She has spoken at conferences including JavaOne/Code One, DevFest and NetBeans days. She has a degree in English Literature.

What is new in Apache NetBeans 9

1 min read

what's new

Last month was an exciting month for NetBeans. Not only was there a brand new release (download it from here), it was also the first official release under the Apache foundation.

Which means a brand new logo and splash screen:

NetBeans splash screen

The first time I ran NetBeans 9, I was asked if I wanted to import my settings from NetBeans 8. All of my settings that I had set up previously (the dark theme, keyboard shortcuts, my custom toolbar, even the project groups I had created) were copied over. I was also given the option to import the plugins I used. I didn’t have to spend any time on setup at all.

I was able to get started straight away with testing many of the features in Apache NetBeans 9:

Java 9 Features

The biggest new feature was Project Jigsaw, which saw the introduction of modularity to Java.

NetBeans 9 allows you to easily create modular projects. When you go to create a new project, one of the options is to create a ‘Java Modular Project’.:

 

When you add a new module to a modular project in NetBeans, module-info.java is automatically created for you.

Java 9 modules

 

If you want to make an existing Java 9 application modular, you can simply add a module-info.java file to the default package.

Another of the Java 9 features that works particularly well in NetBeans is JShell. JShell lets you execute Java code quickly and easily without having to create a whole new class, which makes it a useful learning tool. NetBeans 9 has an inbuilt Java shell that you can run by going to Tools -> Open Java Platform Shell.

jshell

 

Java 10 Features

There is also support for Java 10. By default NetBeans runs on the most recent JVM you have installed. So make sure you have Java 10 installed, and if necessary set the project to Java 10. You can add new versions of Java and set the project to use that version by going to Properties -> Libraries -> Manage Platforms… -> Add Platform…

Setting JDK in NetBeans

Java 10 support means you can use features such as Local-Variable Type Interface. This allows you to declare and initialise local variables with var, rather than specifying a type.

Local variable type interface

What is next?

NetBeans is my already my favourite IDE for testing new Java features. It is constantly being developed, and now that it is under Apache it is really easy to get involved, including contributing code and testing new features.

Are you using NetBeans 9 yet? Let us know what you think of it in the comments.

IDRsolutions develop a Java PDF Viewer and SDK, an Adobe forms to HTML5 forms converter, a PDF to HTML5 converter and a Java ImageIO replacement. On the blog our team post anything interesting they learn about.

Bethan Palmer Bethan is a Java developer and a Java Champion. She has spoken at conferences including JavaOne/Code One, DevFest and NetBeans days. She has a degree in English Literature.

2 Replies to “What is new in Apache NetBeans 9”

    1. Under Apache, development is an open process. You can engage with the developers on dev@netbeans.incubator.apache.org and you can also learn more at https://cwiki.apache.org/confluence/display/NETBEANS/How+to+Participate

      If you are interested in learning about coding NetBeans yourself, we are doing a talk at CodeOne conference in San Francisco in October (Hacking the NetBeans IDE [BOF4760]) and will be running a whole series of blog posts on the same topic in September.

Leave a Reply

Your email address will not be published. Required fields are marked *

IDRsolutions Ltd 2019. All rights reserved.