Apache NetBeans (Incubating)

Friday February 01, 2019

Restructuring of Project Templates in Apache NetBeans

There's been lots of discussion in the Apache NetBeans community about how best to express the fact that Apache Maven and Apache Gradle are more modern choices to be aware of than Apache Ant, while at the same time not implying that there's anything wrong with using Apache Ant.

Here's what we seem to have reached consensus around, i.e., move all Ant-based project templates into a separate Ant-specific folder, while putting the other two build systems higher and therefore more prominently in the list:

With the above, someone is less likely to simply go to the no-longer-existing Java category and then end up with an Ant-based project, without thinking about it. By default, the user of Apache NetBeans is now encouraged to consider Apache Maven and Apache Gradle first. The old Ant-related categories are still there, so as not to confuse anyone completely, just structured within a lower ranked "Java with Ant" category. The above also solves the discussion re "Java EE", i.e., here the idea, from discussions, is to name the category "Java Enterprise".

At startup, all categories are closed, i.e., none is more prominent initially than any other.

An objection one could have is that, if you're a complete Java newbie, you won't know what Maven, Gradle, or Ant are. Well, that has always been the case and NetBeans has artificially hidden that choice by having a category simply named "Java", which then resulted in everyone ending up with Ant-based projects. To turn that around and have a category simply named "Java" that results in Maven-based projects is probably not right either, i.e., a careful balance needs to be struck.

Hoping that all factions in this lengthy discussion are relatively satisfied with this approach. :-)

Issue: https://issues.apache.org/jira/browse/NETBEANS-2040

Pull request: https://github.com/apache/incubator-netbeans/pull/1115

Monday January 28, 2019

Enterprise Cluster Integrated into Apache NetBeans

Hurray, the 'enterprise' cluster, constituting all the modules in Apache NetBeans GitHub that provide features for Java/Jakarta EE development, provided in the 2nd Oracle donation of NetBeans to Apache, has been integrated into the daily builds.

Now, for the first time, out of the box, you'll have the support that was part of NetBeans IDE 8.2 for Java EE development directly available in Apache NetBeans, that is, without you needing to install any plugins.

However, aside from the point that this means we do not yet have Java EE 8 support, since 8.2 did not (could not, because of being released some time prior to Java EE 8) have support for Java EE 8, another question now presents itself—whether we really want to have two categories in the New Project dialog, one named "Java EE" and the other named "Java Web", as shown below, with the former containing project types relating to EJBs and EARs, which are not (should not) be very current anymore, as shown below in the screenshots.

My suggestion would be to either relabel the above to "Modern Java EE" and "Vintage Java EE". (I like the word "Vintage", which I've learned about from JUnit, i.e., that's how they refer to JUnit 4.) Once there is Java EE 8 support, we could use the name "Jakarta" instead of "Modern Java EE". Or, maybe the EJB and EAR support should simply be removed?

Sunday January 27, 2019

Junit 5, Apache Ant, and Apache NetBeans

Junit 5 is, architecturally, so different to previous versions, that it should really be called Jupiter, instead. However, this is not a problem when you're using Maven, since Maven resolves all transitive dependencies for you, and is supported in that way from Apache NetBeans 10 onwards. Not so with Apache Ant, of course, where you need to set each and every JAR you need on a classpath of one form or another.

That is not a pretty picture in the end, when compared to JUnit 4, where you had just that JAR, plus Hamcrest. With JUnit 5, you need, in addition to junit-jupiter-api, junit-jupiter-params, and junit-jupiter-engine, to also declare the transitive dependency apiguardian-api, while in the case of Apache Ant, you need to deal with the JUnitLauncher, if you want to make use of the new junitlauncher Ant task, in addition to four other JARs, which need to be on Ant's classpath, as explained here.

An alternative approach is to use org.junit.platform.console.ConsoleLauncher, as shown here, which looks like this in my build.xml, i.e., it is named test, so that it will run automatically at the end of the test run when the Test Project action is invoked:

<target name="test" depends="compile-test,-pre-test-run">
    <java dir="${work.dir}" 
        <arg value="--scan-classpath"/>
        <arg line="--reports-dir build/test/results"/>
    <junitreport todir="build/test/results">
        <fileset dir="build/test/results">
            <include name="TEST-*.xml"/>
        <report format="frames" todir="build/test/results/html"/>

The above means that the JUnit tasks set by default in the build-impl.xml file will simply fail silently, since I don't have JUnit 4 on my classpath. At the end of the process, the above will be run, org.junit.platform.console.ConsoleLauncher will be found on my classpath, and then the JUnit 5 tests will be run.

What is the advantage of the above over using JUnitLauncher? Well, JUnitLauncher has requirements relating to Ant's path, which has advantages too, of course, i.e., simply set everything up once (which can also be done inside Apache NetBeans, in the Ant tab in the Options window). But, for right now, I'd prefer to work with just one path, i.e., the application's path.

Another downside is that, so far, the above solution doesn't integrate with the Test Results window, though it does produce some nice reports via the junitreport task above, in the build folder.

The key problem seems to me to be that the JUnit Ant task no longer exists in JUnit 5, which was for Ant-based projects the basis of the integration with the Test Results window in Apache NetBeans. If the JUnit task could continue to be used, in whatever way, that would solve a lot of the problems, though the question of the many JARs needed on the classpath would remain. Maybe library providers should reach out to tools providers when putting these kinds of new solutions together, since the only reason that JUnit 5 now works with Maven in Apache NetBeans is that Surefire is used, i.e., in the case of Maven the completely new approach JUnit has taken can simply be avoided there. Here is some relevant discussion in Apache NetBeans GitHub, and the Launcher API looks interesting.

Probably the best solution for Ant users in Apache NetBeans would be to be able to continue to use JUnit 4, rather than JUnit 5, since the latter is a total nightmare to set up in the context of Ant, as described above. In the world of JUnit, "vintage" is the cool name they have for "legacy", and if you're using Ant at all, you're probably best described as "vintage" and hence only having support for JUnit 4 is not a big deal for you. However, not sure at all how that would work, we'd need to investigate how/if when JUnit tests are added to Maven projects, JUnit 5 tests and dependencies would be set, while when adding JUnit tests to Ant projects JUnit 4 tests and dependencies would be set.

Thursday December 27, 2018

[ANNOUNCE] Apache NetBeans (incubating) 10.0 Released

The Apache NetBeans team is proud to announce the release of Apache NetBeans (incubating) 10.0.

Apache NetBeans (incubating) 10.0 constitutes all but the enterprise cluster in the Apache NetBeans Git repo, which together provide the NetBeans Platform (i.e., the underlying application framework), as well as all the modules that provide the Java SE, PHP, JavaScript and Groovy features of Apache NetBeans.

In short, Apache NetBeans (incubating) 10.0 is a full IDE for Java SE, PHP and JavaScript development with some Groovy language support.

Read more on our download page:


New & Noteworthy features of the 10.0 Release:


See the below for the donation status of features that have not been donated or included in Apache builds yet, i.e., are not part of Apache NetBeans (incubating) 10.0, e.g., features for working with C/C++, and more:


Work is being done on bringing netbeans.org to Apache. In the meantime, refer to the below for all details related to Apache NetBeans:


Wednesday November 07, 2018
Tuesday October 23, 2018

Duke Choice Award 2018 for Apache NetBeans

During Oracle Open World 2018, Apache NetBeans was awarded a Duke's Choice Award, recognizing its innovation and the hard and dedicated work involved in moving NetBeans from Oracle to Apache.

A crowd of Apache NetBeans community members received the award on the stage from Georges Saab, VP of the Java Platform at Oracle.

Wednesday October 17, 2018

Apache NetBeans at Oracle Code One 2018

  • Saturday, Oct 20, 19:00 p.m. | Thirsty Bear, 661 Howard Street
    Informal hangout (i.e., buy your own beer) with Apache NetBeans PPMC, committers, and community!

  • Sunday, Oct 21, 11:00 a.m. | Bike Ride
    Go here for details: https://blog.idrsolutions.com/2018/09/open-invitation-to-bike-ride-at-oracle-codeone/.

  • Monday, Oct 22, 1:30 p.m. - 2:15 p.m. | Moscone West - Room 2016
    Title: Machine Learning for Software Developers in 45 Minutes [DEV5090]
    Speakers: Zoran Sevarac, Frank Greco

  • Monday, Oct 22, 1:30 p.m. - 2:15 p.m. | Moscone West - Room 2022
    Title: Back from the Ashes: eFX/JavaFX Applications Made Simple [DEV5406]
    Speakers: Sven Reimers, Florian Vogler

  • Monday, Oct 22, 2:30 p.m. - 3:15 p.m. | Moscone West - Room 2018
    Title: Exploring Java Heap Dumps [DEV5262]
    Speakers: Ryan Cuprak

  • Monday, Oct 22, 7:30 p.m. - 8:15 p.m. | Moscone West - Room 2005
    Title: Deep Learning for Application Performance Optimization [BOF4967]
    Speakers: Zoran Sevarac

  • Monday, Oct 22, 8:30 p.m. - 9:15 p.m. | Moscone West - Room 2009
    Title: Hacking the NetBeans IDE [BOF4760]
    Speakers: Mark Stephens, Developer, Bethan Palmer

  • Tuesday, Oct 23, 7:30 p.m. - 8:15 p.m. | Moscone West - Room 2010
    Title: Writing Better Code (Faster) in the Apache NetBeans IDE [BOF4759]
    Speakers: Mark Stephens, Developer, Bethan Palmer

  • Tuesday, Oct 23, 7:30 p.m. - 8:15 p.m. | Moscone West - Room 2014
    Title: Got a Gig Teaching Java? You Should Be Using Apache NetBeans in the Classroom [BOF4820]
    Speakers: Kenneth Fogel, Instructor, Concordia University

  • Wednesday, Oct 24, 2:30 p.m. - 3:15 p.m. | Moscone West - Room 2016
    Title: Bridging Swing and JavaFX on an Enterprise Scale [DEV6080]
    Speakers: Sven Reimers, José Pereda

  • Wednesday, Oct 24, 9:00 a.m. - 9:45 a.m. | Moscone West - Room 2010
    Title: Java Debugging Tips [DEV4512]
    Speakers: Martin Skarsaune

  • Wednesday, Oct 24, 2:45 p.m. - 4:45 p.m. | Moscone West - Room 2001A (HOL)
    Title: Lambda Programming Laboratory - BYOL [HOL6006]
    Speakers: Jeff Dinkins, Stuart Marks, Maurice Naftalin, José Paumard

  • Thursday, Oct 25, 09:00 AM - 11:00 AM | Moscone West - Overlook 2A (HOL)
    Title: Jakarta EE Hands-on Lab - BYOL [HOL4852]
    Speakers: David Heffelfinger, Bob Larsen

Wednesday October 10, 2018

Initial Language Server Protocol Support in Apache NetBeans 10

Did you know that the first stage of Language Server Protocol (LSP) support will be included in Apache NetBeans 10?

See this PR for details, with instructions for how to use it.


Some screenshots for Kotlin support via LSP:

Screen Shot 2018-10-10 at 12.45.19.png

Screen Shot 2018-10-10 at 12.46.41.png

Screen Shot 2018-10-10 at 12.37.39.png

A lot more work needs to be done, of course, some of which is here, you're welcome to join in:


Thursday September 06, 2018

Audio of Virtual Apache NetBeans Meeting 3

The third of a series of informal virtual meetups took place today, focused specifically on why/how/when to move netbeans.org to Apache.

The audio of the meeting is available here and takes about 53 minutes:


Screenshot of what we saw of each other, partly:

Related links:

Wednesday September 05, 2018

Apache NetBeans Guest Blog: Edward M. Kagan

I'm a big fan of NetBeans, and a team-lead of 2pm.tech crew, a group of independent developers from Russia. For about the last five years, we have been using NetBeans in all of our projects, from "hardcore C embedded systems" to "Grails web-apps", and as a result we've also been hacking NetBeans a little.

As of 2018, there are now 11 developers in the team. Currently, half of us work with Grails apps, despite the poor Grails support in NetBeans at the moment. We're continuing to work with NetBeans due to it simplicity, small footprint, and design. If the NetBeans community would dig up the Groovy/Grails support, lots of developers will switch to NetBeans I think, and also I'll be very happy, too. :-)

One of coolest things we've created lately is the Crew Look & Feel plugin, which we hadn't released to the public yet and now we think the time has come. It's not too complicated, but a nice little add-in to have, maybe it'll be useful for other users too. Here it is on the Plugin Portal:


Click to enlarge the images below, to get a feel for the new plugin that provides our look and feel:



NetBeans is my favorite IDE and Apache is one of my technological icons. So, I'm very happy for NetBeans to be migrating to Apache. Apache does not always give you a sweet design, though it does always provide nice UNIX-like tools, and I love it. I hope Apache will make NetBeans not only better, but the best IDE for all Java-based technologies. :-)

Tuesday August 21, 2018

Audio of Virtual Apache NetBeans Meeting 2

The second of a series of informal virtual meetups took place today.

The audio of the meeting is available here and takes about 45 minutes:


Sign up to the next virtual meetups here:


Thursday August 16, 2018

NetBeans Status at InfoQ

Today an article was published on InfoQ describing the current state and progress of Apache NetBeans.

Click to read the start of it here:

Screen Shot 2018-08-21 at 11.24.28.png

Go here to read it all:


Tuesday August 07, 2018

Audio of Virtual Apache NetBeans Meeting 1

The first of a series of informal virtual meetups took place today.

The audio of the meeting is available here and takes about an hour:


Sunday July 29, 2018

[ANNOUNCE] Apache NetBeans (incubating) 9.0 Released

The Apache NetBeans team is proud to announce the release of Apache NetBeans (incubating) 9.0.

Apache NetBeans (incubating) 9.0 constitutes all the modules in the Apache NetBeans Git repo, which together provide the NetBeans Platform (i.e., the underlying application framework), as well as all the modules that provide the Java SE-related features of Apache NetBeans. In short, Apache NetBeans (incubating) 9.0 is a full IDE for Java SE development.

Read more on our download page:


New & Noteworthy features of the 9.0 Release:


See the below for the donation status of features that have not been donated or included in Apache builds yet, i.e., are not part of Apache NetBeans (incubating) 9.0, e.g., features for working with Java EE, JavaScript, PHP, C/C++, and more:


Also see:

What's Happened to My Favorite NetBeans Plugins?

Work is being done on bringing netbeans.org to Apache. In the meantime, refer to the below for all details related to Apache NetBeans:


Disclaimer: Apache NetBeans is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Sunday July 22, 2018

What's "nb-javac" in Apache NetBeans?

Not long after you start up Apache NetBeans (incubating) 9.0 on top of JDK 8, after accepting the license agreement and handling import settings, you're confronted with this dialog:

What does that mean? And why, when you start up Apache NetBeans (incubating) 9.0 on top of JDK 9 or above, do you see the following, instead:

Note: The above appears in a balloon popup in the bottom right the first time you start up Apache NetBeans (incubating) 9.0 on JDK 9 or above. If you miss out on seeing or responding to the message, go to Window | IDE Tools | Notifications anytime afterwards and you'll have another opportunity to install it:

Let's start by looking at the question, what is "nb-javac"? Well, "nb-javac", which is a patched version of "javac", i.e., the Java compiler, has long been part of NetBeans, providing a highly tuned Java compiler specifically for the Java editor in NetBeans, and wasn't part of the donation of NetBeans to Apache since, of course, the Java compiler (or a fork thereof) cannot be part of the donation. That's because Oracle is not donating Java to Apache, instead, it is donating NetBeans. The Java compiler belongs to the JDK which is licensed to Oracle.

Separate from Oracle's obvious understandable unwillingness to donate a Java compiler fork to Apache, or anyone else, Apache would have a problem with a fork of the Java compiler being distributed from Apache since the Java compiler is LGPL licensed.

In short, neither Oracle nor Apache want the Java compiler to be part of NetBeans in Apache. Yet, NetBeans gains a lot from the patched Java compiler, as explained below:


Also see this reference for details on the situation:


However, using model APIs added in JDK 9, Apache NetBeans can make use of the Java compiler directly from the JDK, as explained here:


So, as can be seen, from Apache NetBeans running on JDK 9 and onwards, you have a choice: either use the Java compiler from the JDK, which means you're not benefiting from a number of enhancements especially added for NetBeans over many years in the patched Java compiler, or you need to explicitly add the patched Java compiler, since it is provided by Oracle and its licensing is such that you need to take responsibility for installing it yourself. On the other hand, if you're using Apache NetBeans with JDK 8, the choice is simpler, i.e., you need to install nb-javac, otherwise you will not be able to use Java in Apache NetBeans.

It's not an ideal situation. On the other hand, if someone has a better solution, please feel free to propose that solution and also consider providing a pull request too!



Hot Blogs (today's hits)

Tag Cloud