Apache NetBeans

Related tags

netbeans hacktoberfest

Apache NetBeans

Apache NetBeans is an open source development environment, tooling platform, and application framework.

Build status

  • GitHub actions
    • Apache Netbeans Continuous Integration
  • TravisCI:
    • Build Status
  • Apache Jenkins:
    • Linux: Build Status
    • Windows: Build Status


  • Git
  • Ant 1.9.9 or above
  • JDK 8 or 11 (to build NetBeans)
  • JDK 9 or above (to run NetBeans)
  • MinGW (optional), to build Windows Launchers


  • NetBeans also runs with JDK 8, although then it will not include tools for the JDK 9 Shell.
  • NetBeans license violation checks are managed via the rat-exclusions.txt file.
  • Set JAVA_HOME and ANT_HOME appropriately or leave them undefined.

Building NetBeans

Build with the default config (See the cluster.config property.)

$ ant

Build the basic project (mainly, JavaSE features):

$ ant -Dcluster.config=basic

Build the full project (including Groovy, PHP, JavaEE/JakartaEE, and JavaScript features):

$ ant -Dcluster.config=full

Build the NetBeans Platform:

$ ant -Dcluster.config=platform


Building Windows Launchers

Windows launchers can be build using MinGW both on Windows and Linux.

Note: In Windows MSYS must be installed.

As of NETBEANS-1145, the Windows Launchers can be built adding do.build.windows.launchers=true property to the build process.

$ ant -Ddo.build.windows.launchers=true
Software Requirement to Build Windows Launchers on Ubuntu (16.04+):
sudo apt install make mingw-w64

Generating Javadoc

Build javadoc:

$ ant build javadoc

Note Run javadoc-nb task in Netbeans to run the javadoc build and display it in a web browser.

Running NetBeans

Run the build:

$ ant tryme

Note: Look in nbbuild/netbeans for the NetBeans installation created by the build process.

Get In Touch

Subscribe or mail the [email protected] list - Ask questions, find answers, and also help other users.

Subscribe or mail the [email protected] list - Join development discussions, propose new ideas and connect with contributors.


Developer builds can be downloaded: Latest build (netbeans-xxx.zip).

Convenience binary of released source artifacts: https://netbeans.apache.org/download/index.html.

Reporting Bugs

Bugs should be reported to https://issues.apache.org/jira/projects/NETBEANS/issues/

Full History

The origins of the code in this repository are older than its Apache existence. As such significant part of the history (before the code was donated to Apache) is kept in an independent repository. To fully understand the code you may want to merge the modern and ancient versions together:

$ git clone https://github.com/apache/netbeans.git
$ cd netbeans
$ git log platform/uihandler/arch.xml

This gives you just few log entries including the initial checkin and change of the file headers to Apache. But then the magic comes:

$ git remote add emilian https://github.com/emilianbold/netbeans-releases.git
$ git fetch emilian # this takes a while, the history is huge!
$ git replace 6daa72c98 32042637 # the 1st donation
$ git replace 6035076ee 32042637 # the 2nd donation

When you search the log, or use the blame tool, the full history is available:

$ git log platform/uihandler/arch.xml
$ git blame platform/uihandler/arch.xml

Many thanks to Emilian Bold who converted the ancient history to his Git repository and made the magic possible!

  • NETBEANS-59 - Document split actions

    NETBEANS-59 - Document split actions

    Cleaned up code as discussed here: #1

    Everything fine now?

    opened by Chris2011 66
  • [NETBEANS-2604] Support SVG icon loading from ImageUtilities

    [NETBEANS-2604] Support SVG icon loading from ImageUtilities

    This PR adds support for SVG icon loading from ImageUtilities, and tests it by adding SVG icons for the Undo and Redo actions. See https://issues.apache.org/jira/browse/NETBEANS-2604 and the attached screenshot. This PR depends on https://github.com/apache/netbeans/pull/1273, which must be applied first. This PR can be reviewed more or less independently (just ignore the first commit, which contains all the changes from the other PR).

    Some questions for more experienced NetBeans veterans:

    • Are my module and package naming conventions appropriate? (E.g. put SVGLoader in org.openide.util.spi, and name the implementation module "org.openide.util.ui.svg".)
    • Am I filling in apichanges.xml correctly? (The previous entry, about VectorIcon, was from an earlier PR of mine as well, but I don't see that one reflected at https://bits.netbeans.org/11.0/javadoc/apichanges.html , which puzzles me.)
    • Is it correct to use "OpenIDE-Module-Display-Category=Infrastructure" for the SVG Loader module? (In platform/openide.util.ui.svg/src/org/openide/util/svg/Bundle.properties.)
    • Would it be better to keep the SVGLoader SPI in a private package, instead having the implementation module depend on the implementation version of openide.util.ui to gain access to it? I don't anticipate anyone ever needing to provide an alternative implementation.
    • Is there anything I need to do to verify that the JAR hashes are correct? The JARs from Maven Central are not exactly the same as those from https://xmlgraphics.apache.org/batik/download.html .
    • Is the inclusion of a some dependency JARs (commons-io, commons-logging, and xml-apis) from libs.batik OK? They all have the same Apache 2.0 license. There are existing wrapper modules for commons-io and commons-logging, but those are in the "ide" cluster, and I assume modules in the "platform" cluster shouldn't depend on modules in the "ide" cluster? Should the SVG loader implementation module (openide.util.ui.svg) rather be in the "ide" cluster?
    • When I build my NetBeans Platform app against a NetBeans build with this patch applied, SVG support is enabled even though I didn't add the supposedly-optional openide.util.ui.svg module (which provides the SVGLoaderImpl service provider) as a maven dependency. Why is this? How can I make it so that platform application developers need to request SVG support explicitly? And related: Where do I specify which maven coordinates the openide.util.ui.svg module should use?
    • Am I doing versioning right for the libs.batik library? Does it make sense to assign it version 1.0 rather than Batik's own version, which is 1.11?

    Thanks for your help!

    Example SVG icons loaded and displayed in the IDE: SVG icon screenshot

    Example renderings of other SVG files tested (from Ultorg, an application built on the NetBeans Platform), as displayed using the platform/o.n.swing.tabcontrol/test/unit/src/org/netbeans/swing/tabcontrol/plaf/VectorIconTester.java utility (which was added in an earlier commit): SVG Icons Tested

    API Change 
    opened by eirikbakke 54
  • NETBEANS-1499 - change package.json icon

    NETBEANS-1499 - change package.json icon

    This PR will change the generic js icon for a specific file (package.json) with a specific mimetype (text/package+x-json) to the logo of npm, to make it more prominent.

    Before merging, we have to check the licenses of the npm logo: https://www.npmjs.com/policies/trademark. I wrote them an e-mail, will let you know whether it is ok or not. Maybe a license guy can help here too.

    This logo is also used inside of a VS Code plugin for better icons for specific filetypes.

    enhancement JavaScript NB11.1 
    opened by Chris2011 53
  • Maven first in New Project Wizard

    Maven first in New Project Wizard

    There's a discussion in the netbeans-dev mailing listabout changing the layout of the "New project" wizard.

    Currently the "Java" Category creates an ANT-based project. As ANT is old and only few projects use it, this Category should use Maven. This can be done by simply rearranging the projects a bit, mostly via branding.

    opened by dukescript 47
  • Add TypeScript editor

    Add TypeScript editor

    An attempt to provide TypeScript editor features using the LSP client/server.

    DO NOT squash TypeScript 
    opened by jlahoda 37
  • [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

    [NETBEANS-4294] Donation of original AutoSave module to Apache NetBeans

    The first PR for the AutoSave module donation. Please, let me know any issue it has to be fixed asap. Thank you in advance.

    opened by mgraciano 35
  • [NETBEANS-4940] Workaround for caret-on-TAB drawing issue

    [NETBEANS-4940] Workaround for caret-on-TAB drawing issue

    In ide/editor/lib/BaseCaret there's

    newCaretBounds = c.getUI().modelToView(
            c, offset, Position.Bias.Forward);
    // [TODO] Temporary fix - impl should remember real bounds computed by paintCustomCaret()
    if (newCaretBounds != null) {
        newCaretBounds.width = Math.max(newCaretBounds.width, 2);

    When offset is sitting on a TAB character, editor.lib2's TabView's modelToViewChecked(int offset, Shape alloc,... does

            mutableBounds.width = 1;
            return mutableBounds;

    So the min of 2 applies and the caret drawing code gets a graphics context with clip width of 2.

    This causes a drawing problem for the caret which can be ovserved in NetBeans. The problem may be exacerbated for plugins that provide their own caret. This fix provides a workaround that can be used by plugins until (if) the problem is addressed.

    opened by errael 35
  • Option to skip CoS copying of class files when the target is already newer, such as from an external compilation

    Option to skip CoS copying of class files when the target is already newer, such as from an external compilation

    Related to #227791 and linked issues. This is a robustness fix: in NetBeans currently, when the built-in compiler gets confused during classpath scanning and writes out broken class files due to various subtle bugs, as happens pretty frequently in my experience on big complex projects, CoS-mode execution (e.g., running of individual unit tests in quick mode) is broken because the test JVM loads bytecode full of errors (“uncompilable source code” etc.). This is irritating because the errors are almost always from classes deep in the dependency tree and unrelated to what you are actually editing and testing, yet the problem blocks you from using CoS mode and so you must fall back to much slower full builds.

    With this patch, NetBeans will just trust the external build tool preferentially, based on *.class timestamp. Thus, if you notice some error during a CoS test case run which was caused by an IDE problem, you have a simple workaround: just do a command-line rebuild of the module containing the class mentioned in the error. You can still make edits to unrelated (source or test) files and rerun the test to pick up those changes. I have been running with this patch for over a year and it seems to work well; I no longer curse in frustration at nbjavac bugs, just note them and move on.

    java.source.base is giving me 29 test failures after 20m (!) run time, but I picked one at random and confirmed that it was also failing in master, so at least that one is not a regression. When was the last time mvn -f whatever.module test actually worked?

    opened by jglick 34
  • OpenJDK download plugin

    OpenJDK download plugin

    foojay would like to include into NetBeans a plugin that allows users to download JDKs.

    Users can pick one of the many OpenJDK distributions, download it and then auto-register it with NetBeans (or allow the users to manually install it globally).

    The dependencies are Apache, BSD and MIT.

    The code itself is Apache licensed and this commit just includes the code from https://github.com/foojay2020/nbplugin2/ If more paperwork is required by the PMC then I think @geertjanw with the Azul hat can clarify privately.

    The plugin needs this JAR file uploaded to OSUOSL https://github.com/foojay2020/nbplugin2/blob/main/foojaysupport/release/modules/ext/discoclient-1.0.jar under the name 6E147B7F363AD52D6BD10C32C64A273FA07F7EED-discoclient-1.0.jar The code for this plugin is at https://github.com/foojay2020/discoclient/tree/java8 but since it's not published in Maven Central we have to include it through OSUOSL.

    I think this is a great feature for NetBeans end users!

    The plugin is not perfect and feedback is appreciated. It will be maintained by me / foojay going forward.

    Screenshot 2021-03-31 at 19 02 11 Screenshot 2021-03-31 at 19 03 48
    opened by emilianbold 33
  • [NETBEANS-290] Provided support for hyperlink on dependencies.

    [NETBEANS-290] Provided support for hyperlink on dependencies.

    Introduced tests to help ensure I didn't break existing functionality, as I noticed that there was some code duplication in the existing implementation but more importantly, I couldn't see an approach to introduce this logic for introducing hyperlinks on dependencies within the existing class as it was.

    opened by mcdonnell-john 31
  • Bugfix: Go To source broken for nested classes.

    Bugfix: Go To source broken for nested classes.

    This PR is part of the fixes needed for https://issues.apache.org/jira/browse/NETBEANS-6041 This is a fix for gradle projects, but since it's also broken for MAVEN (and possible standard netbeans projects) might need to be refactored to a different common module to fix it everywhere at once. Not sure what would be the best place.

    opened by ratcashdev 0
  • LSP: Test results displayed using the new TestExplorer API.

    LSP: Test results displayed using the new TestExplorer API.

    The new VSCode's API used to display test results.

    opened by dbalek 0
  • Must reach ELEMENTS_RESOLVED before working with java els

    Must reach ELEMENTS_RESOLVED before working with java els

    Even after recent delivery merge, I've found some more places where I should call .toPhase().

    opened by sdedic 0
  • Do not persist breakpoints and watches when debugging through LSP server.

    Do not persist breakpoints and watches when debugging through LSP server.

    Debugger has it's own Properties API for settings persistence. We use it in LSP to override the default for breakpoints and watches persistence.

    opened by entlicher 1
  • Revert

    Revert "Performance optimizations to speed up remote debugging."

    This reverts commit 25a3d5273bde897bfc3a28877dd9f62973fa7a17.

    The referenced commit breaks single stepping (handling of multiple breakpoints being hit, visualizing the current execution position in the IDE).

    opened by matthiasblaesing 2
  • Support of setting the current working directory and environment variables.

    Support of setting the current working directory and environment variables.

    Extending ExplicitProcessParameters with working directory and environment. Adapted for Maven and native image. Gradle support is TBD.

    opened by entlicher 0
  • Update JavaFX to 17

    Update JavaFX to 17


    Upgrade Library 
    opened by matthiasblaesing 2
  • Update JNA and JNA platform to 5.9.0

    Update JNA and JNA platform to 5.9.0

    sigtest data was regenerated and checked. The changes to the interfaces in the platform are ok:

    • additions to the interfaces just expose additional native methods
    • incompatible changes are fixes for functions that were broken hard before the change and thus are either already broken or were not used
    Upgrade Library 
    opened by matthiasblaesing 1
  • [jackpot] source version fix for java versions using the new scheme.

    [jackpot] source version fix for java versions using the new scheme.

    :: sourceVersionGE(...) only worked with the old scheme. Trivial fix.

    opened by mbien 1
The Apache Software Foundation
The Apache Software Foundation