View source | Discuss this page | Page history | Printable version   

ERP 2.50:Developers Guide/Installation and setup of Netbeans IDE

Warning.png   This document is still a work in progress. It may contain inaccuracies or errors.

Important note: Netbeans is a fully functional development environment for Openbravo ERP but at the moment this document is just an skeleton and is not ready for production purposes. Eclipse is the preferred development environment for Openbravo ERP. The following page describes how to setup and configure Openbravo within Eclipse. Installation and setup of Eclipse IDE.



This article is a step-by-step guide in install and setup Netbeans Integrated Development Environment (IDE) for Openbravo ERP development.

"Netbeans is a free, open-source Integrated Development Environment for software developers. You get all the tools you need to create professional desktop, enterprise, web, and mobile applications with the Java language, C/C++, and even dynamic languages such as PHP, JavaScript, Groovy, and Ruby. The NetBeans IDE is easy to install and use straight out of the box and runs on many platforms including Windows, Linux, Mac OS X and Solaris.", according to Netbeans's community. For more general or technical information concerning the Netbeans IDE, please visit:

Some of the features of using Netbeans can be read in the Netbeans IDE Features page.

Minimum requirements

First, it is important to set up the environment in which Openbravo ERP works correctly, i.e.:

The following packages are included in the 'Java' edition of Netbeans and it is not necesary to download it. But at your option, you can use your own packages.

In addition, a system with a minimum of 1GB of memory is required.

As your version control system you can either use Mercurial or Subversion clients both plugins are included by default in Netbeans. But it is necesary to install Mercurial or Subversion first.

Netbeans IDE

Download the latest version of the Netbeans IDE and select the edition 'Java'. This edition comes with support for Java Web and EE development and includes the Tomcat application server.

Before getting started

Before getting started, please follow these few tips to configure properly Netbeans for Openbravo ERP development.

You can tune Netbeans performance and avoid OutOfMemoryExceptions by editing and overwriting the file config/netbeans.conf and add the following options to the netbeans_default_options property:

-J-Xms40m -J-Xmx1024m -J-XX:PermSize=32m -J-XX:MaxPermSize=256m 

If you prefer another look and feel for the Netbeans environment add the following option to the netbeans_default_options property for example to select the default java Metal look and feel:

--laf javax.swing.plaf.metal.MetalLookAndFeel

Checking out Openbravo ERP source code


To get the sources of Openbravo ERP you must clone the source repository the Openbravo ERP repositories are published in Openbravo Mercurial Repositories Index.

Clone External Repository. Mercurial Repository
Clone External Repository. Mercurial Paths
Clone External Repository. Destination Directory
Mercurial Working Files

After all these steps you will have a clone of the Openbravo ERP repository and can start installing Openbravo ERP.

Installing Openbravo ERP

Before importing Openbravo ERP projects you must configure and install Openbravo ERP. Here there is the minimum steps to follow to get a working Openbravo ERP installation. There is a complete guide to install Openbravo ERP in the | Openbravo ERP Installation guide.


For example:

export JAVA_HOME=/usr/lib/jvm/java-6-sun
export CATALINA_BASE=/home/ubuntu/.netbeans/6.7/apache-tomcat-6.0.18_base
export CATALINA_HOME=/usr/local/apache-tomcat-6.0.18
export CATALINA_OPTS="-Djava.awt.headless=true -Xms384M -Xmx1024M -XX:MaxPermSize=256M"
export ANT_OPTS="-Xmx1024M -XX:MaxPermSize=256M"
ant install.source

Importing Openbravo ERP projects

After Openbravo ERP is properly installed you can start importing the Netbeans projects to develop Openbravo ERP. Start Netbeans and follow the same order of this tutorial because of the dependencies between projects. We recommend to follow the same directories structure shown in this tutorial for the projects.

Openbravo Core

New Project
New Java Project with Existing Sources
New Java Project with Existing Sources
New Java Project with Existing Sources

Openbravo WAD

New Java Project with Existing Sources
New Java Project with Existing Sources
New Java Project with Existing Sources

Openbravo Trl

New Java Project with Existing Sources
New Java Project with Existing Sources
New Java Project with Existing Sources

Openbravo Main Project

New Java Project with Existing Sources
New Java Project with Existing Sources
New Java Project with Existing Sources

After importing all these four projects you will have a fully featured development environment for Openbravo ERP. The general aspect of your ID should look like this image_

Openbravo ERP develoment environment

Compiling and building Openbravo ERP from Netbeans

To build Openbravo ERP there exist an ant script that provides a large list of tasks and options that allow to build Openbravo ERP and execute several maintenance tasks related to the development. You can find all these tasks in detail in the Development Build Tasks document.

These ant tasks can be executed from the command line or from the Netbeans environment and even create shortcuts in Netbeans to execute these ant tasks.

To execute the ant tasks from the Openbravo ERP environment go to the Files tab and select the build.xml file that is in the root directory of the Openbravo ERP sources. After this file is selected, in the window Navigator will appear all the available targets. You can select one target and select Run Target to execute the target or Create Shortcut... to create a shortcut in the menu or in the toolbar to execute quickly the selected target.

When executing an ant target all the results will be displayed in the Output window. In the following image there is an example of the execution progress of the compile.complete.deploy target.

Executing a target

Running Openbravo ERP

To run Openbravo ERP you only have to start the Tomcat Application Server. With Netbeans you can manage your Tomcat Application Server. Go to the Services tab, open the node Server and select the Tomcat Application Server. From here you can start, stop, open a browser... And you can also edit from here the Tomcat Application Server properties.

Debugging Openbravo ERP

To debug with Netbeans, first you have to start the Tomcat Application Server in debug mode. To do this go to the Services tab, open the node Servers, select the Tomcat Application Server and execute it in Debug mode. By default the Tomcat Application Server debugger transport is configured to use the socket port 11555, but you can change these settings selecting the Tomcat Application Server and execute Properties. In this window go to the Startup tab and modify the Debugger Transport settings.

Servers. Debugger Transport.

When starting Tomcat Application Server in debug mode, two output windows will appear, one with the Tomcat Application Server log output and the other with the console output. Wait until the Tomcat Application Server starts up and in the Debug menu, select Attach Debugger.... In this window select the debugger transport you used to configure your Tomcat Application Server, and if the Tomcat Application Server is located in other machine, edit also the host name. Press OK and the debug session will start. To stop the debug session press the Stop button or select the menu option Debug -> Finish Debugger Session.

Debug. Attach Debugger...


For any question or doubt regarding Netbeans IDE installation and setup, post them in Openbravo Developers forum or join #openbravo IRC channel in Freenode.

Retrieved from ""

This page has been accessed 39,861 times. This page was last modified on 14 June 2011, at 11:04. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.