Pre-Requisites
Download and install following:
- Java Development Kit (see README for version requirements; https://foojay.io/download/ can help to find a JDK)
- IDE - NetBeans recommended (note: if you install NetBeans you are ready to go since you'll also get bundled Ant and GIT, so no further installation and configuration will be required, so you can continue from Getting Started section)
- Apache Ant (https://ant.apache.org/) version 1.10 or greater.
- GIT (https://git-scm.com/downloads)
To find out which JDK version, source level to use for NetBeans contributions see: Minimum JDK build and run policy. (the maximum allowed source level is the minimum supported JDK version, i.e. : support JDK 17,21 implies maximum source level 17).
Following instructions assume that you already have an account on https://github.com and you are familiar with basic GIT operations as fork (making copy of project under your account) and clone (making your local development copy)
Getting Started
If you plan to submit changes, then you should fork the Apache NetBeans GitHub repo, to do this please follow the steps here on GitHub - just replace the example repository for https://github.com/apache/netbeans. If you don't plan to submit changes and want to just browse the codebase beforehand, you can always clone the main GitHub repository, but you won't be able to submit pull requests from this.
In the examples below, if you have created a fork then please clone your fork and not the apache repository.
Step | Without NetBeans | With NetBeans |
---|---|---|
Clone | Clone the Apache NetBeans Git Repo (https://github.com/apache/netbeans) $ git clone git@github.com:apache/netbeans.git $ cd netbeans If you are cloning your own fork, then the clone command would be different, please have a look at your fork in GitHub. | Clone the Apache NetBeans Git Repo (https://github.com/apache/netbeans) If you are cloning your own fork, then the clone command would be different, please have a look at your fork in GitHub. |
Build | Before running ant, verify that the environment variables JAVA_HOME and ANT_HOME are properly defined. $ ant | |
Run | $ ant tryme | |
Debug | You can pass java options through the netbeans launcher via Start pre-built NetBeans and wait for debugger to attach $ /bin/netbeans -J-agentlib:jdwp=transport=dt_socket,suspend=y,server=y,address=9009 To run a freshly build netbeans you can invoke: Run development version through Ant waiting for debugger $ ant -Ddebug.port=9009 tryme This will start the build IDE with a test userdir and it will wait on tcp port 9009 for debugger connections. |