Building NetBeans IDE source for Python Development
For the generic guide to work with NetBeans sources, see http://wiki.netbeans.org/HgNetBeansSources
Obtaining the Sources
- Open a terminal (command prompt) window, and navigate to a directory (folder) where you want the code to reside.
- Clone the core-main repository.
hg clone http://hg.netbeans.org/core-main
- Navigate to the main root directory (just created by the hg clone command), and clone the contrib repository.
hg clone http://hg.netbeans.org/main/contribThis will create the contrib directory containing the Python sources (and other community-supported projects).
- After the clone is over, go to the main/nbbuild directory and create the file user.build.properties with the following recommended entries:
cluster.config=python nbjdk.home=[Your JDK location here] permit.jdk7.builds=true build.compiler=extJavac javac.compilerargs=-J-Xmx512m
Line 1 allows building with JDK 7.
Line 2: You must enter the path to your JDK here. On Windows, use double-backslashes. (e.g. nbjdk.home=C:\\Program Files\\Java\\jdk1.7.0_71)
Lines 3 and 4 point to the 'javac' compiler details.
- Now execute ant from the nbbuild directory. This starts the build process.
- After the build is successful, navigate to the nbbuild/netbeans/bin directory to fire up the NetBeans executable (netbeans[.exe]).
DebuggingIf you need to debug the resulting netbeans executable, add the following line to your user.build.properties :
and build again. You can follow the ‘Debugging the NetBeans Platform' guide as a starting point for debugging the NetBeans/Python environment.
Working with mercurial
Mercurial is the distributed version control software used by Netbeans and the Python NetBeans module. The starting point to use it is the 'Netbeans Mercurial How-to'
When working daily (or nightly!) in the Netbeans python code you may be faced with urgent simple fixes (ready to commit) mixed with more complex changes that you want keep locally until they reach a stable state. Meanwhile another developer has pushed modifications ready to be merged. This tricky situation may happen often and you'll may find yourself scratching your head when you see the infamous:
$ hg merge abort: outstanding uncommitted changes
Tor Norbye provided some good Mercurial tips regarding this scenario on his blog.
Before filing a bug, check for duplicates by searching Bugzilla at
If you find an existing report for your bug, please comment on it and/or "vote" for it.
Otherwise, file your newly-found bug under the Python category: http://www.netbeans.org/issues/enter_bug.cgi?component=python&issue_type=DEFECT