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:
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.
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.
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…
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.
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.