lunes, 17 de marzo de 2008

How to use Marge(Java Bluetooth Framework) in Netbeans 6 IDE

Marge is a framework created by Bruno Ghisi and Lucas Torri under the LGPL license.

See also:
Marge Home
NetBeans 6.0 CLDC/MIDP Development Quick Start Guide

Downloading Marge
Creating a new project
Including Marge Jar

    What you need?
  • Java Development Kit (

  • NetBeans 6 IDE with Mobility plugins (
    *Choose the full version to ensure that nothing is missing

  • Marge Framework (

Downloading Marge

Download the marge v 0.4.0 or higher:

Creating a new project

*Open NetBeans IDE, create a new project then select File->New Project... and select category "Mobility" and MIDP Application. Click Next.

*Set your project name and location for example,
Name: Marge-Test
Location: /home/$YOUR_USER/NetBeansProjects

*Select the Sun Java Wireless Toolkit 2.52 for CLDC as the Emulator Platform and use the remaining defaults. Click Next.

*Expand "Configuration templates provided by installed CLDC platforms" and "Sun Java Wireless Toolkit 2.52 for CLDC" folders. Check at least one of the configurations. The IDE automatically creates a new project configuration for each template listed. Feel free to check all avail configurations.

*Click Finish. The IDE creates the project folder. You can see your MIDlet in the Visual Mobile Designer.

Including Marge Jar

*Once the project is created we need to put Marge as project Library. Right click in the project's name (in our case, Marge-Test) and select Properties. Select Libraries and Resources under Build node on the left panel. Click in Add Jar/Zip, select Marge jar and click Ok.

If everything went correct, you will be able to see Marge package being displayed in the project structure and you are ready to use!