It seems Oracle lawyers have advised the Netbeans team that they can no longer ship JUnit with the Netbeans IDE. I originally did not understand this issue (see update below), but it seems that the Netbeans team have a neat way to deal with this “advice” anyway.
When you run Netbeans for the first time you are prompted to download JUnit testing library, as this is not distributed with Netbeans.
Selecting OK will download the netbeans plug-in for JUnit and start the plug-in installer.
After accepting the JUnit 4 licence agreement, the install completes in a few seconds. There is no need to restart the Netbeans IDE.
This approach with Netbeans and JUnit was experiences with Netbeans 7 beta 2, OpenJDK 6 and Ubuntu 10.10.
Update from Neil Bartlett:
JUnit is still licensed under the Common Public Licence (CPL) which was superceded by the Eclipse Public Licence (EPL) in many project. The only difference between CPL and EPL is this clause, which EPL removes:
If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed.
This clause leads to the possibility that if Oracle ever sues a contributor to JUnit for patent infringement, then all patent licenses granted to Oracle by that contributor could be revoked.
Oracle have no such problem with the EPL software licence. NetBeans and many other Oracle products include parts licensed under EPL.
According to Kent Beck, if the CPL license is a big enough problem to get lawyers involved, then its an important enough reason to buy a commercial license. Unless Oracle wants to pay for a commercial license, pay to get JUnit re-licensed or forget about suing anyone contributing to JUnit, then I guess the Netbeans team will have to keep their work-around.
At least it seems that Netbeans 7 is back on track with JUnit and seems to be working well on OpenJDK, despite recommendations to only use the Oracle Java SDK.
This work is licensed under a Creative Commons Attribution 4.0 ShareAlike License, including custom images & stylesheets. Permissions beyond the scope of this license may be available at @jr0cket